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

Unified Diff: chrome/browser/extensions/api/settings_overrides/settings_overrides_api.h

Issue 2623833005: Revert of Make extensions DSE persistent in browser prefs (Closed)
Patch Set: Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/api/settings_overrides/settings_overrides_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/settings_overrides/settings_overrides_api.h
diff --git a/chrome/browser/extensions/api/settings_overrides/settings_overrides_api.h b/chrome/browser/extensions/api/settings_overrides/settings_overrides_api.h
index 89fd425c5ee5f8079bb1426ba8554900beb14213..2781665c3a50a89eab72586b1f07d05956c3f1dc 100644
--- a/chrome/browser/extensions/api/settings_overrides/settings_overrides_api.h
+++ b/chrome/browser/extensions/api/settings_overrides/settings_overrides_api.h
@@ -5,7 +5,6 @@
#ifndef CHROME_BROWSER_EXTENSIONS_API_SETTINGS_OVERRIDES_SETTINGS_OVERRIDES_API_H_
#define CHROME_BROWSER_EXTENSIONS_API_SETTINGS_OVERRIDES_SETTINGS_OVERRIDES_API_H_
-#include <memory>
#include <set>
#include <string>
@@ -33,12 +32,14 @@
private:
friend class BrowserContextKeyedAPIFactory<SettingsOverridesAPI>;
+ typedef std::set<scoped_refptr<const Extension> > PendingExtensions;
+
// Wrappers around PreferenceAPI.
void SetPref(const std::string& extension_id,
const std::string& pref_key,
- std::unique_ptr<base::Value> value) const;
+ base::Value* value);
void UnsetPref(const std::string& extension_id,
- const std::string& pref_key) const;
+ const std::string& pref_key);
// ExtensionRegistryObserver implementation.
void OnExtensionLoaded(content::BrowserContext* browser_context,
@@ -47,6 +48,11 @@
const Extension* extension,
UnloadedExtensionInfo::Reason reason) override;
+ // KeyedService implementation.
+ void Shutdown() override;
+
+ void OnTemplateURLsLoaded();
+
void RegisterSearchProvider(const Extension* extension) const;
// BrowserContextKeyedAPI implementation.
static const char* service_name() { return "SettingsOverridesAPI"; }
@@ -54,9 +60,15 @@
Profile* profile_;
TemplateURLService* url_service_;
+ // List of extensions waiting for the TemplateURLService to Load to
+ // have search provider registered.
+ PendingExtensions pending_extensions_;
+
// Listen to extension load, unloaded notifications.
ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver>
extension_registry_observer_;
+
+ std::unique_ptr<TemplateURLService::Subscription> template_url_sub_;
DISALLOW_COPY_AND_ASSIGN(SettingsOverridesAPI);
};
« no previous file with comments | « no previous file | chrome/browser/extensions/api/settings_overrides/settings_overrides_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698