Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(120)

Side by Side Diff: extensions/browser/api/storage/storage_frontend.cc

Issue 2733283002: Require explicit selection of traits for LazyInstance (Closed)
Patch Set: l10n again Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "extensions/browser/api/storage/storage_frontend.h" 5 #include "extensions/browser/api/storage/storage_frontend.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 13 matching lines...) Expand all
24 #include "extensions/browser/value_store/value_store_factory.h" 24 #include "extensions/browser/value_store/value_store_factory.h"
25 #include "extensions/common/api/storage.h" 25 #include "extensions/common/api/storage.h"
26 26
27 using content::BrowserContext; 27 using content::BrowserContext;
28 using content::BrowserThread; 28 using content::BrowserThread;
29 29
30 namespace extensions { 30 namespace extensions {
31 31
32 namespace { 32 namespace {
33 33
34 base::LazyInstance<BrowserContextKeyedAPIFactory<StorageFrontend> > g_factory = 34 base::LazyInstance<BrowserContextKeyedAPIFactory<StorageFrontend>>::
35 LAZY_INSTANCE_INITIALIZER; 35 DestructorAtExit g_factory = LAZY_INSTANCE_INITIALIZER;
36 36
37 // Settings change Observer which forwards changes on to the extension 37 // Settings change Observer which forwards changes on to the extension
38 // processes for |context| and its incognito partner if it exists. 38 // processes for |context| and its incognito partner if it exists.
39 class DefaultObserver : public SettingsObserver { 39 class DefaultObserver : public SettingsObserver {
40 public: 40 public:
41 explicit DefaultObserver(BrowserContext* context) 41 explicit DefaultObserver(BrowserContext* context)
42 : browser_context_(context) {} 42 : browser_context_(context) {}
43 43
44 // SettingsObserver implementation. 44 // SettingsObserver implementation.
45 void OnSettingsChanged(const std::string& extension_id, 45 void OnSettingsChanged(const std::string& extension_id,
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 // static 184 // static
185 BrowserContextKeyedAPIFactory<StorageFrontend>* 185 BrowserContextKeyedAPIFactory<StorageFrontend>*
186 StorageFrontend::GetFactoryInstance() { 186 StorageFrontend::GetFactoryInstance() {
187 return g_factory.Pointer(); 187 return g_factory.Pointer();
188 } 188 }
189 189
190 // static 190 // static
191 const char* StorageFrontend::service_name() { return "StorageFrontend"; } 191 const char* StorageFrontend::service_name() { return "StorageFrontend"; }
192 192
193 } // namespace extensions 193 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698