Chromium Code Reviews| 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..81271208cd069dc0a58a52442095c1efb2efb671 100644 |
| --- a/chrome/browser/extensions/extension_service.h |
| +++ b/chrome/browser/extensions/extension_service.h |
| @@ -457,7 +457,18 @@ class ExtensionService |
| external_updates_finished_callback_ = callback; |
| } |
| + void AddExtensionToExemptedFromDisableFlag(const std::string& extensionId) { |
|
Devlin
2016/08/10 19:22:31
A few notes here.
- These functions are pretty sim
catmullings
2016/08/29 20:42:27
I'll go with the first option.
Done.
|
| + disable_flag_exempted_extensions_.insert(extensionId); |
| + } |
| + |
| + bool IsExtensionExemptedFromDisableFlag(const std::string& extensionId) { |
| + return disable_flag_exempted_extensions_.find(extensionId) != |
| + disable_flag_exempted_extensions_.end(); |
| + } |
| + |
| private: |
| + 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 +605,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 +630,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. |