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

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

Issue 559603002: Add new ExtensionManagement preference (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase; fixes Created 6 years, 3 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_management.h
diff --git a/chrome/browser/extensions/extension_management.h b/chrome/browser/extensions/extension_management.h
index 1bfe39b4d8e68137b09356b53425d2b9c8291330..c3eccda371e95de69224f680804df7892612f257 100644
--- a/chrome/browser/extensions/extension_management.h
+++ b/chrome/browser/extensions/extension_management.h
@@ -31,6 +31,31 @@ class BrowserContext;
namespace extensions {
+namespace schema_constants {
+
+extern const char kAllOtherExtension[];
+
+extern const char kInstallationMode[];
+extern const char kAllowed[];
+extern const char kBlocked[];
+extern const char kForceInstalled[];
+extern const char kNormalInstalled[];
+
+extern const char kUpdateUrl[];
+extern const char kInstallSources[];
+extern const char kAllowedTypes[];
+
+extern const char kUpdateUrlPrefix[];
+
+struct AllowedTypesMapType {
+ const char* name;
+ Manifest::Type manifest_type;
Joao da Silva 2014/09/18 12:08:22 Document these 2 fields
binjin 2014/09/18 14:37:27 Done. I also renamed AllowedTypesMapType into Allo
+};
+
+extern const AllowedTypesMapType kAllowedTypesMap[];
Joao da Silva 2014/09/18 12:08:22 Add a size constant for this array: extern const
binjin 2014/09/18 14:37:27 Done.
+
+} // namespace schema_constants
Joao da Silva 2014/09/18 12:08:22 Move these constants to separate files. This class
binjin 2014/09/18 14:37:27 Done.
+
// Tracks the management policies that affect extensions and provides interfaces
// for observing and obtaining the global settings for all extensions, as well
// as per-extension settings.
@@ -64,7 +89,14 @@ class ExtensionManagement : public KeyedService {
// by an ID, a group of extensions with specific |update_url| or all
// extensions at once.
struct IndividualSettings {
+ enum Scope {
+ SCOPE_DEFAULT = 0,
+ SCOPE_BY_UPDATE_URL,
Joao da Silva 2014/09/18 12:08:22 This scope is never being used
binjin 2014/09/18 14:37:27 Done.
+ SCOPE_INDIVIDUAL,
Joao da Silva 2014/09/18 12:08:22 Document what each value means
binjin 2014/09/18 14:37:27 Done.
+ };
+
void Reset();
+ bool Parse(const base::DictionaryValue* dict, Scope scope);
Joao da Silva 2014/09/18 12:08:22 These methods don't belong in the interface either
binjin 2014/09/18 14:37:27 Done. I left Reset() though.
// Extension installation mode. Setting this to INSTALLATION_FORCED or
// INSTALLATION_RECOMMENDED will enable extension auto-loading (only
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_management.cc » ('j') | chrome/browser/extensions/extension_management.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698