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

Side by Side Diff: chrome/browser/extensions/api/settings_overrides/settings_overrides_api.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/extensions/api/settings_overrides/settings_overrides_ap i.h" 5 #include "chrome/browser/extensions/api/settings_overrides/settings_overrides_ap i.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <memory> 8 #include <memory>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 13 matching lines...) Expand all
24 #include "extensions/browser/extension_prefs.h" 24 #include "extensions/browser/extension_prefs.h"
25 #include "extensions/browser/extension_prefs_factory.h" 25 #include "extensions/browser/extension_prefs_factory.h"
26 #include "extensions/browser/extension_registry.h" 26 #include "extensions/browser/extension_registry.h"
27 #include "extensions/common/error_utils.h" 27 #include "extensions/common/error_utils.h"
28 #include "extensions/common/manifest_constants.h" 28 #include "extensions/common/manifest_constants.h"
29 29
30 namespace extensions { 30 namespace extensions {
31 31
32 namespace { 32 namespace {
33 33
34 base::LazyInstance<BrowserContextKeyedAPIFactory<SettingsOverridesAPI> > 34 base::LazyInstance<BrowserContextKeyedAPIFactory<SettingsOverridesAPI>>::
35 g_factory = LAZY_INSTANCE_INITIALIZER; 35 DestructorAtExit g_factory = LAZY_INSTANCE_INITIALIZER;
36 36
37 const char kManyStartupPagesWarning[] = "* specifies more than 1 startup URL. " 37 const char kManyStartupPagesWarning[] = "* specifies more than 1 startup URL. "
38 "All but the first will be ignored."; 38 "All but the first will be ignored.";
39 39
40 using api::manifest_types::ChromeSettingsOverrides; 40 using api::manifest_types::ChromeSettingsOverrides;
41 41
42 std::string SubstituteInstallParam(std::string str, 42 std::string SubstituteInstallParam(std::string str,
43 const std::string& install_parameter) { 43 const std::string& install_parameter) {
44 base::ReplaceSubstringsAfterOffset(&str, 0, "__PARAM__", install_parameter); 44 base::ReplaceSubstringsAfterOffset(&str, 0, "__PARAM__", install_parameter);
45 return str; 45 return str;
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 252
253 template <> 253 template <>
254 void BrowserContextKeyedAPIFactory< 254 void BrowserContextKeyedAPIFactory<
255 SettingsOverridesAPI>::DeclareFactoryDependencies() { 255 SettingsOverridesAPI>::DeclareFactoryDependencies() {
256 DependsOn(ExtensionPrefsFactory::GetInstance()); 256 DependsOn(ExtensionPrefsFactory::GetInstance());
257 DependsOn(PreferenceAPI::GetFactoryInstance()); 257 DependsOn(PreferenceAPI::GetFactoryInstance());
258 DependsOn(TemplateURLServiceFactory::GetInstance()); 258 DependsOn(TemplateURLServiceFactory::GetInstance());
259 } 259 }
260 260
261 } // namespace extensions 261 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698