Index: chrome/browser/net/predictor_api.cc |
diff --git a/chrome/browser/net/predictor_api.cc b/chrome/browser/net/predictor_api.cc |
index 33bf25d50f80b85b27ded66ec6b119c1d2add5d9..6898dfa9171ef91a698560bd1d068621590e9ef6 100644 |
--- a/chrome/browser/net/predictor_api.cc |
+++ b/chrome/browser/net/predictor_api.cc |
@@ -8,7 +8,7 @@ |
#include <string> |
#include "base/metrics/field_trial.h" |
-#include "base/singleton.h" |
+#include "base/lazy_instance.h" |
#include "base/stl_util-inl.h" |
#include "base/string_number_conversions.h" |
#include "base/thread.h" |
@@ -330,7 +330,8 @@ class OffTheRecordObserver : public NotificationObserver { |
} |
private: |
- friend struct DefaultSingletonTraits<OffTheRecordObserver>; |
+ friend struct base::DefaultLazyInstanceTraits<OffTheRecordObserver>; |
+ |
OffTheRecordObserver() : count_off_the_record_windows_(0) {} |
~OffTheRecordObserver() {} |
@@ -340,6 +341,9 @@ class OffTheRecordObserver : public NotificationObserver { |
DISALLOW_COPY_AND_ASSIGN(OffTheRecordObserver); |
}; |
+static base::LazyInstance<OffTheRecordObserver> g_off_the_record_observer( |
+ base::LINKER_INITIALIZED); |
+ |
//------------------------------------------------------------------------------ |
// This section supports the about:dns page. |
//------------------------------------------------------------------------------ |
@@ -576,7 +580,7 @@ PredictorInit::PredictorInit(PrefService* user_prefs, |
// We will register the incognito observer regardless of whether prefetching |
// is enabled, as it is also used to clear the host cache. |
- Singleton<OffTheRecordObserver>::get()->Register(); |
+ g_off_the_record_observer.Get().Register(); |
if (trial_->group() != disabled_prefetch) { |
// Initialize the DNS prefetch system. |