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

Side by Side Diff: extensions/browser/api/declarative/rules_registry_service.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/declarative/rules_registry_service.h" 5 #include "extensions/browser/api/declarative/rules_registry_service.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 // TODO(vabr): Remove once http://crbug.com/218451#c6 gets addressed. 126 // TODO(vabr): Remove once http://crbug.com/218451#c6 gets addressed.
127 rule_registries_.clear(); 127 rule_registries_.clear();
128 content::BrowserThread::PostTask( 128 content::BrowserThread::PostTask(
129 content::BrowserThread::IO, FROM_HERE, 129 content::BrowserThread::IO, FROM_HERE,
130 base::Bind(&RegisterToExtensionWebRequestEventRouterOnIO, 130 base::Bind(&RegisterToExtensionWebRequestEventRouterOnIO,
131 browser_context_, 131 browser_context_,
132 RulesRegistryService::kDefaultRulesRegistryID, 132 RulesRegistryService::kDefaultRulesRegistryID,
133 scoped_refptr<WebRequestRulesRegistry>(NULL))); 133 scoped_refptr<WebRequestRulesRegistry>(NULL)));
134 } 134 }
135 135
136 static base::LazyInstance<BrowserContextKeyedAPIFactory<RulesRegistryService> > 136 static base::LazyInstance<BrowserContextKeyedAPIFactory<RulesRegistryService>>::
137 g_factory = LAZY_INSTANCE_INITIALIZER; 137 DestructorAtExit g_factory = LAZY_INSTANCE_INITIALIZER;
138 138
139 // static 139 // static
140 BrowserContextKeyedAPIFactory<RulesRegistryService>* 140 BrowserContextKeyedAPIFactory<RulesRegistryService>*
141 RulesRegistryService::GetFactoryInstance() { 141 RulesRegistryService::GetFactoryInstance() {
142 return g_factory.Pointer(); 142 return g_factory.Pointer();
143 } 143 }
144 144
145 // static 145 // static
146 RulesRegistryService* RulesRegistryService::Get( 146 RulesRegistryService* RulesRegistryService::Get(
147 content::BrowserContext* context) { 147 content::BrowserContext* context) {
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 } 229 }
230 230
231 void RulesRegistryService::OnExtensionUninstalled( 231 void RulesRegistryService::OnExtensionUninstalled(
232 content::BrowserContext* browser_context, 232 content::BrowserContext* browser_context,
233 const Extension* extension, 233 const Extension* extension,
234 extensions::UninstallReason reason) { 234 extensions::UninstallReason reason) {
235 NotifyRegistriesHelper(&RulesRegistry::OnExtensionUninstalled, extension); 235 NotifyRegistriesHelper(&RulesRegistry::OnExtensionUninstalled, extension);
236 } 236 }
237 237
238 } // namespace extensions 238 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/api/clipboard/clipboard_api.cc ('k') | extensions/browser/api/hid/hid_connection_resource.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698