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

Side by Side Diff: chrome/browser/extensions/api/settings_overrides/settings_overrides_api.cc

Issue 54273004: Add SettingsOverridesAPI dependence on TemplateURLServiceFactory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add a dependence on PreferenceAPI Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/extensions/api/settings_overrides/settings_overrides_api.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/chrome_notification_types.h" 9 #include "chrome/browser/chrome_notification_types.h"
10 #include "chrome/browser/extensions/api/preference/preference_api.h" 10 #include "chrome/browser/extensions/api/preference/preference_api.h"
11 #include "chrome/browser/extensions/extension_prefs.h" 11 #include "chrome/browser/extensions/extension_prefs.h"
12 #include "chrome/browser/extensions/extension_prefs_factory.h"
12 #include "chrome/browser/prefs/session_startup_pref.h" 13 #include "chrome/browser/prefs/session_startup_pref.h"
13 #include "chrome/browser/search_engines/template_url.h" 14 #include "chrome/browser/search_engines/template_url.h"
14 #include "chrome/browser/search_engines/template_url_service_factory.h" 15 #include "chrome/browser/search_engines/template_url_service_factory.h"
15 #include "chrome/common/extensions/manifest_handlers/settings_overrides_handler. h" 16 #include "chrome/common/extensions/manifest_handlers/settings_overrides_handler. h"
16 #include "chrome/common/pref_names.h" 17 #include "chrome/common/pref_names.h"
17 #include "content/public/browser/notification_details.h" 18 #include "content/public/browser/notification_details.h"
18 #include "content/public/browser/notification_source.h" 19 #include "content/public/browser/notification_source.h"
19 #include "extensions/common/error_utils.h" 20 #include "extensions/common/error_utils.h"
20 #include "extensions/common/manifest_constants.h" 21 #include "extensions/common/manifest_constants.h"
21 22
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 scoped_ptr<AssociatedExtensionInfo> info(new AssociatedExtensionInfo); 206 scoped_ptr<AssociatedExtensionInfo> info(new AssociatedExtensionInfo);
206 info->extension_id = extension->id(); 207 info->extension_id = extension->id();
207 info->wants_to_be_default_engine = settings->search_engine->is_default; 208 info->wants_to_be_default_engine = settings->search_engine->is_default;
208 info->install_time = 209 info->install_time =
209 ExtensionPrefs::Get(profile_)->GetInstallTime(extension->id()); 210 ExtensionPrefs::Get(profile_)->GetInstallTime(extension->id());
210 TemplateURLData data = ConvertSearchProvider(*settings->search_engine); 211 TemplateURLData data = ConvertSearchProvider(*settings->search_engine);
211 url_service_->AddExtensionControlledTURL(new TemplateURL(profile_, data), 212 url_service_->AddExtensionControlledTURL(new TemplateURL(profile_, data),
212 info.Pass()); 213 info.Pass());
213 } 214 }
214 215
216 template <>
217 void ProfileKeyedAPIFactory<SettingsOverridesAPI>::
218 DeclareFactoryDependencies() {
219 DependsOn(ExtensionPrefsFactory::GetInstance());
220 DependsOn(PreferenceAPI::GetFactoryInstance());
221 DependsOn(TemplateURLServiceFactory::GetInstance());
222 }
223
215 } // namespace extensions 224 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/settings_overrides/settings_overrides_api.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698