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

Unified Diff: chrome/browser/extensions/extension_web_ui.h

Issue 1543923002: [Extensions] Fix chrome url override settings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Latest master Created 5 years 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
Index: chrome/browser/extensions/extension_web_ui.h
diff --git a/chrome/browser/extensions/extension_web_ui.h b/chrome/browser/extensions/extension_web_ui.h
index 0d44b0e271242ab1a2b2b807d0edd1d475707ca3..2d32f04669ed5794037cb7f20a1a9cf7b00213b4 100644
--- a/chrome/browser/extensions/extension_web_ui.h
+++ b/chrome/browser/extensions/extension_web_ui.h
@@ -48,16 +48,31 @@ class ExtensionWebUI : public content::WebUIController {
static bool HandleChromeURLOverrideReverse(
GURL* url, content::BrowserContext* browser_context);
- // Register and unregister a dictionary of one or more overrides.
- // Page names are the keys, and chrome-extension: URLs are the values.
- // (e.g. { "newtab": "chrome-extension://<id>/my_new_tab.html" }
- static void RegisterChromeURLOverrides(Profile* profile,
+ // Initialize the Chrome URL overrides. This must happen *before* any further
+ // calls for URL overrides!
+ static void InitializeChromeURLOverrides(Profile* profile);
+
+ // Validate the Chrome URL overrides, ensuring that each is valid and points
+ // to an existing extension. To be called once all extensions are loaded.
+ static void ValidateChromeURLOverrides(Profile* profile);
+
+ // Add new Chrome URL overrides. If an entry exists, it is marked as active.
+ // If one doesn't exist, it is added at the beginning of the list of
+ // overrides (meaning it has priority).
+ static void RegisterOrActivateChromeURLOverrides(
+ Profile* profile,
+ const extensions::URLOverrides::URLOverrideMap& overrides);
+
+ // Deactivate overrides without removing them from the list or modifying their
+ // positions in the list.
+ static void DeactivateChromeURLOverrides(
+ Profile* profile,
const extensions::URLOverrides::URLOverrideMap& overrides);
- static void UnregisterChromeURLOverrides(Profile* profile,
+
+ // Completely unregister overrides, removing them from the list.
+ static void UnregisterChromeURLOverrides(
+ Profile* profile,
const extensions::URLOverrides::URLOverrideMap& overrides);
- static void UnregisterChromeURLOverride(const std::string& page,
- Profile* profile,
- const base::Value* override);
// Called from BrowserPrefs
static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
« no previous file with comments | « chrome/browser/extensions/extension_override_apitest.cc ('k') | chrome/browser/extensions/extension_web_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698