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

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

Issue 2166513002: Create --disable-extensions-except switch (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed patch 10 code review Created 4 years, 4 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
Index: chrome/browser/extensions/extension_service.h
diff --git a/chrome/browser/extensions/extension_service.h b/chrome/browser/extensions/extension_service.h
index 0f1ea91ff6e8a66f91ce3a7ee1f4396547f1c94d..e702b2a5fa487253da080dae7ab9c15beda3d996 100644
--- a/chrome/browser/extensions/extension_service.h
+++ b/chrome/browser/extensions/extension_service.h
@@ -458,6 +458,9 @@ class ExtensionService
}
private:
+ // Loads extensions specified via a command line flag/switch.
+ void LoadExtensionsFromCommandLineFlag(const char* switch_name);
+
// Reloads the specified extension, sending the onLaunched() event to it if it
// currently has any window showing. |be_noisy| determines whether noisy
// failures are allowed for unpacked extension installs.
@@ -594,6 +597,8 @@ class ExtensionService
const base::FilePath& install_dir,
const base::FilePath& extension_path);
+ const base::CommandLine* command_line_ = nullptr;
+
// The normal profile associated with this ExtensionService.
Profile* profile_ = nullptr;
@@ -617,6 +622,10 @@ class ExtensionService
// These extensions should appear in registry_.
extensions::ExtensionSet greylist_;
+ // Set of whitelisted enabled extensions loaded from the
+ // --disable-extensions-except command line flag.
+ std::set<std::string> disable_flag_exempted_extensions_;
+
// The list of extension installs delayed for various reasons. The reason
// for delayed install is stored in ExtensionPrefs. These are not part of
// ExtensionRegistry because they are not yet installed.
« no previous file with comments | « chrome/browser/extensions/chrome_extensions_browser_client.cc ('k') | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698