OLD | NEW |
---|---|
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" |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
205 scoped_ptr<AssociatedExtensionInfo> info(new AssociatedExtensionInfo); | 205 scoped_ptr<AssociatedExtensionInfo> info(new AssociatedExtensionInfo); |
206 info->extension_id = extension->id(); | 206 info->extension_id = extension->id(); |
207 info->wants_to_be_default_engine = settings->search_engine->is_default; | 207 info->wants_to_be_default_engine = settings->search_engine->is_default; |
208 info->install_time = | 208 info->install_time = |
209 ExtensionPrefs::Get(profile_)->GetInstallTime(extension->id()); | 209 ExtensionPrefs::Get(profile_)->GetInstallTime(extension->id()); |
210 TemplateURLData data = ConvertSearchProvider(*settings->search_engine); | 210 TemplateURLData data = ConvertSearchProvider(*settings->search_engine); |
211 url_service_->AddExtensionControlledTURL(new TemplateURL(profile_, data), | 211 url_service_->AddExtensionControlledTURL(new TemplateURL(profile_, data), |
212 info.Pass()); | 212 info.Pass()); |
213 } | 213 } |
214 | 214 |
215 template <> | |
216 void ProfileKeyedAPIFactory<SettingsOverridesAPI>:: | |
217 DeclareFactoryDependencies() { | |
218 DependsOn(ExtensionSystemFactory::GetInstance()); | |
not at google - send to devlin
2013/10/31 14:56:12
I don't see an ExtensionSystem dependency here, bu
vasilii
2013/10/31 15:06:47
Done.
| |
219 DependsOn(TemplateURLServiceFactory::GetInstance()); | |
220 } | |
221 | |
215 } // namespace extensions | 222 } // namespace extensions |
OLD | NEW |