| 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 #ifndef CHROME_BROWSER_EXTENSIONS_API_SETTINGS_OVERRIDES_SETTINGS_OVERRIDES_API_
H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_SETTINGS_OVERRIDES_SETTINGS_OVERRIDES_API_
H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_SETTINGS_OVERRIDES_SETTINGS_OVERRIDES_API_
H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_SETTINGS_OVERRIDES_SETTINGS_OVERRIDES_API_
H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 // Wrappers around PreferenceAPI. | 36 // Wrappers around PreferenceAPI. |
| 37 void SetPref(const std::string& extension_id, | 37 void SetPref(const std::string& extension_id, |
| 38 const std::string& pref_key, | 38 const std::string& pref_key, |
| 39 base::Value* value); | 39 base::Value* value); |
| 40 void UnsetPref(const std::string& extension_id, | 40 void UnsetPref(const std::string& extension_id, |
| 41 const std::string& pref_key); | 41 const std::string& pref_key); |
| 42 // content::NotificationObserver implementation. | 42 // content::NotificationObserver implementation. |
| 43 virtual void Observe(int type, | 43 virtual void Observe(int type, |
| 44 const content::NotificationSource& source, | 44 const content::NotificationSource& source, |
| 45 const content::NotificationDetails& details) OVERRIDE; | 45 const content::NotificationDetails& details) OVERRIDE; |
| 46 // BrowserContextKeyedService implementation. | 46 // KeyedService implementation. |
| 47 virtual void Shutdown() OVERRIDE; | 47 virtual void Shutdown() OVERRIDE; |
| 48 | 48 |
| 49 void OnTemplateURLsLoaded(); | 49 void OnTemplateURLsLoaded(); |
| 50 | 50 |
| 51 void RegisterSearchProvider(const Extension* extension) const; | 51 void RegisterSearchProvider(const Extension* extension) const; |
| 52 // BrowserContextKeyedAPI implementation. | 52 // BrowserContextKeyedAPI implementation. |
| 53 static const char* service_name() { return "SettingsOverridesAPI"; } | 53 static const char* service_name() { return "SettingsOverridesAPI"; } |
| 54 | 54 |
| 55 Profile* profile_; | 55 Profile* profile_; |
| 56 TemplateURLService* url_service_; | 56 TemplateURLService* url_service_; |
| 57 | 57 |
| 58 // List of extensions waiting for the TemplateURLService to Load to | 58 // List of extensions waiting for the TemplateURLService to Load to |
| 59 // have search provider registered. | 59 // have search provider registered. |
| 60 PendingExtensions pending_extensions_; | 60 PendingExtensions pending_extensions_; |
| 61 | 61 |
| 62 content::NotificationRegistrar registrar_; | 62 content::NotificationRegistrar registrar_; |
| 63 scoped_ptr<TemplateURLService::Subscription> template_url_sub_; | 63 scoped_ptr<TemplateURLService::Subscription> template_url_sub_; |
| 64 | 64 |
| 65 DISALLOW_COPY_AND_ASSIGN(SettingsOverridesAPI); | 65 DISALLOW_COPY_AND_ASSIGN(SettingsOverridesAPI); |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 template <> | 68 template <> |
| 69 void BrowserContextKeyedAPIFactory< | 69 void BrowserContextKeyedAPIFactory< |
| 70 SettingsOverridesAPI>::DeclareFactoryDependencies(); | 70 SettingsOverridesAPI>::DeclareFactoryDependencies(); |
| 71 | 71 |
| 72 } // namespace extensions | 72 } // namespace extensions |
| 73 | 73 |
| 74 #endif // CHROME_BROWSER_EXTENSIONS_API_SETTINGS_OVERRIDES_SETTINGS_OVERRIDES_A
PI_H_ | 74 #endif // CHROME_BROWSER_EXTENSIONS_API_SETTINGS_OVERRIDES_SETTINGS_OVERRIDES_A
PI_H_ |
| OLD | NEW |