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

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

Issue 10542048: Add a group policy controlling which sites can install extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 6 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 | « chrome/browser/download/download_crx_util.cc ('k') | chrome/browser/extensions/crx_installer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/crx_installer.h
diff --git a/chrome/browser/extensions/crx_installer.h b/chrome/browser/extensions/crx_installer.h
index 9d9ad3b4ac38343d4ee8342ebcb61f581c72c1ad..f90c85fb4e35023dea9c0e6976eaca2e2672a5c6 100644
--- a/chrome/browser/extensions/crx_installer.h
+++ b/chrome/browser/extensions/crx_installer.h
@@ -54,6 +54,15 @@ class CrxInstaller
: public SandboxedExtensionUnpackerClient,
public ExtensionInstallPrompt::Delegate {
public:
+ // Used in histograms; do not change order.
+ enum OffStoreInstallAllowReason {
+ OffStoreInstallDisallowed,
+ OffStoreInstallAllowedFromSettingsPage,
+ OffStoreInstallAllowedBecausePref,
+ OffStoreInstallAllowedInTest,
+ NumOffStoreInstallAllowReasons
+ };
+
// Extensions will be installed into frontend->install_directory(),
// then registered with |frontend|. Any install UI will be displayed
// using |client|. Pass NULL for |client| for silent install
@@ -146,8 +155,12 @@ class CrxInstaller
install_cause_ = install_cause;
}
- bool allow_off_store_install() const { return allow_off_store_install_; }
- void set_allow_off_store_install(bool val) { allow_off_store_install_ = val; }
+ OffStoreInstallAllowReason off_store_install_allow_reason() const {
+ return off_store_install_allow_reason_;
+ }
+ void set_off_store_install_allow_reason(OffStoreInstallAllowReason reason) {
+ off_store_install_allow_reason_ = reason;
+ }
void set_page_ordinal(const StringOrdinal& page_ordinal) {
page_ordinal_ = page_ordinal;
@@ -312,7 +325,7 @@ class CrxInstaller
int creation_flags_;
// Whether to allow off store installation.
- bool allow_off_store_install_;
+ OffStoreInstallAllowReason off_store_install_allow_reason_;
DISALLOW_COPY_AND_ASSIGN(CrxInstaller);
};
« no previous file with comments | « chrome/browser/download/download_crx_util.cc ('k') | chrome/browser/extensions/crx_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698