Skip to content

Commit

Permalink
Avoid duplicate g_instance definition, to compile with Jumbo.
Browse files Browse the repository at this point in the history
TBR=bratell@opera.com,tzik@chromium.org

Change-Id: I18ed5a01a9142725c96972a8d774e41f69f6f818
Reviewed-on: https://chromium-review.googlesource.com/792942
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#519655}
  • Loading branch information
mstensho authored and Commit Bot committed Nov 28, 2017
1 parent 66d28a0 commit 912d693
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions base/time/default_clock.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

namespace base {
namespace {
LazyInstance<DefaultClock>::Leaky g_instance = LAZY_INSTANCE_INITIALIZER;
LazyInstance<DefaultClock>::Leaky g_default_clock_instance =
LAZY_INSTANCE_INITIALIZER;
}

DefaultClock::~DefaultClock() {}
Expand All @@ -19,7 +20,7 @@ Time DefaultClock::Now() {

// static
DefaultClock* DefaultClock::GetInstance() {
return g_instance.Pointer();
return g_default_clock_instance.Pointer();
}

} // namespace base
5 changes: 3 additions & 2 deletions base/time/default_tick_clock.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

namespace base {
namespace {
LazyInstance<DefaultTickClock>::Leaky g_instance = LAZY_INSTANCE_INITIALIZER;
LazyInstance<DefaultTickClock>::Leaky g_default_tick_clock_instance =
LAZY_INSTANCE_INITIALIZER;
}

DefaultTickClock::~DefaultTickClock() {}
Expand All @@ -19,7 +20,7 @@ TimeTicks DefaultTickClock::NowTicks() {

// static
DefaultTickClock* DefaultTickClock::GetInstance() {
return g_instance.Pointer();
return g_default_tick_clock_instance.Pointer();
}

} // namespace base

0 comments on commit 912d693

Please sign in to comment.