Index: chrome/browser/extensions/crx_installer.h |
diff --git a/chrome/browser/extensions/crx_installer.h b/chrome/browser/extensions/crx_installer.h |
index 5a9d51b4d25a8d51fbb3df11d9b5f56c86b5cc1e..e33b8ef63e3dec0196d707eec4cde57d68a57d2b 100644 |
--- a/chrome/browser/extensions/crx_installer.h |
+++ b/chrome/browser/extensions/crx_installer.h |
@@ -54,6 +54,15 @@ class CrxInstaller |
: public SandboxedExtensionUnpackerClient, |
public ExtensionInstallUI::Delegate { |
public: |
+ // Used in histograms; do not change order. |
+ enum OffStoreInstallAllowReason { |
+ OffStoreInstallDisallowed, |
+ OffStoreInstallAllowedFromSettingsPage, |
+ OffStoreInstallAllowedBecausePref, |
Mattias Nissler (ping if slow)
2012/06/08 09:38:22
nit: I'd rename this to OffStoreInstallAllowedByPr
|
+ OffStoreInstallAllowedInTest, |
+ NumOffStoreInstallAllowReasons |
Mattias Nissler (ping if slow)
2012/06/08 09:38:22
Style guide says "Though the Google C++ Style Guid
|
+ }; |
+ |
// 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); |
}; |