Skip to content

Commit

Permalink
Clarify/correct some names/namespaces.
Browse files Browse the repository at this point in the history
Bug: none
Change-Id: Id7babbc8374b70132c7b716db20b10d0ce677cc5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4865007
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1196405}
  • Loading branch information
pkasting authored and Chromium LUCI CQ committed Sep 14, 2023
1 parent c50616b commit 8a26056
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions PRESUBMIT.py
Original file line number Diff line number Diff line change
Expand Up @@ -634,8 +634,9 @@ class BanRule:
'deprecated (http://crbug.com/634507). Please avoid converting away',
'from the Time types in Chromium code, especially if any math is',
'being done on time values. For interfacing with platform/library',
'APIs, use FromMicroseconds() or InMicroseconds(), or one of the other',
'type converter methods instead. For faking TimeXXX values (for unit',
'APIs, use base::Time::(From,To)DeltaSinceWindowsEpoch() or',
'base::{TimeDelta::In}Microseconds(), or one of the other type',
'converter methods instead. For faking TimeXXX values (for unit',
'testing only), use TimeXXX() + Microseconds(N). For',
'other use cases, please contact base/time/OWNERS.',
),
Expand Down
6 changes: 3 additions & 3 deletions base/time/time.h
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ class BASE_EXPORT Time : public time_internal::TimeBase<Time> {
// month is set to 31 on a 28-30 day month. Returns Time(0) on overflow.
// FromLocalExploded respects the current time zone but does not attempt to
// use the calendar or day-of-week encoding from the current locale - see the
// comments on base::Time::Exploded for more information.
// comments on Exploded for more information.
[[nodiscard]] static bool FromUTCExploded(const Exploded& exploded,
Time* time) {
return FromExploded(false, exploded, time);
Expand Down Expand Up @@ -795,7 +795,7 @@ class BASE_EXPORT Time : public time_internal::TimeBase<Time> {
// of the year 30828. Some platforms might convert over a wider input range.
// LocalExplode respects the current time zone but does not attempt to use the
// calendar or day-of-week encoding from the current locale - see the comments
// on base::Time::Exploded for more information.
// on Exploded for more information.
void UTCExplode(Exploded* exploded) const { Explode(false, exploded); }
void LocalExplode(Exploded* exploded) const { Explode(true, exploded); }

Expand All @@ -812,7 +812,7 @@ class BASE_EXPORT Time : public time_internal::TimeBase<Time> {
// DEPRECATED - Do not use in new code. When deserializing from `base::Value`,
// prefer the helpers from //base/json/values_util.h instead.
// Otherwise, use `Time::FromDeltaSinceWindowsEpoch()` for `Time` and
// `TimeDelta::FromMicroseconds()` for `TimeDelta`. http://crbug.com/634507
// `Microseconds()` for `TimeDelta`. http://crbug.com/634507
static constexpr Time FromInternalValue(int64_t us) { return Time(us); }

private:
Expand Down

0 comments on commit 8a26056

Please sign in to comment.