| Index: chrome/browser/safe_browsing/safe_browsing_service.cc
|
| diff --git a/chrome/browser/safe_browsing/safe_browsing_service.cc b/chrome/browser/safe_browsing/safe_browsing_service.cc
|
| index c8e3c091f89dc3834c626e885aef8917ccb79ffb..62486248eddcace961df89aaf058932df6da217b 100644
|
| --- a/chrome/browser/safe_browsing/safe_browsing_service.cc
|
| +++ b/chrome/browser/safe_browsing/safe_browsing_service.cc
|
| @@ -6,8 +6,8 @@
|
|
|
| #include "base/callback.h"
|
| #include "base/command_line.h"
|
| +#include "base/lazy_instance.h"
|
| #include "base/path_service.h"
|
| -#include "base/singleton.h"
|
| #include "base/string_util.h"
|
| #include "chrome/browser/browser_process.h"
|
| #include "chrome/browser/browser_thread.h"
|
| @@ -62,13 +62,16 @@ class SafeBrowsingServiceFactoryImpl : public SafeBrowsingServiceFactory {
|
| }
|
|
|
| private:
|
| - friend struct DefaultSingletonTraits<SafeBrowsingServiceFactoryImpl>;
|
| + friend struct base::DefaultLazyInstanceTraits<SafeBrowsingServiceFactoryImpl>;
|
|
|
| SafeBrowsingServiceFactoryImpl() { }
|
|
|
| DISALLOW_COPY_AND_ASSIGN(SafeBrowsingServiceFactoryImpl);
|
| };
|
|
|
| +static base::LazyInstance<SafeBrowsingServiceFactoryImpl>
|
| + g_safe_browsing_service_factory_impl(base::LINKER_INITIALIZED);
|
| +
|
| struct SafeBrowsingService::WhiteListedEntry {
|
| int render_process_host_id;
|
| int render_view_id;
|
| @@ -97,7 +100,7 @@ SafeBrowsingService::SafeBrowsingCheck::~SafeBrowsingCheck() {}
|
| /* static */
|
| SafeBrowsingService* SafeBrowsingService::CreateSafeBrowsingService() {
|
| if (!factory_)
|
| - factory_ = Singleton<SafeBrowsingServiceFactoryImpl>::get();
|
| + factory_ = g_safe_browsing_service_factory_impl.Pointer();
|
| return factory_->CreateSafeBrowsingService();
|
| }
|
|
|
|
|