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

Unified Diff: extensions/browser/extension_prefs.cc

Issue 384423002: [Canceled] Extensions: Add install_flags parameter to ManagementPolicy::UserMayLoad (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update tests Created 6 years, 5 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 | « extensions/browser/extension_prefs.h ('k') | extensions/browser/management_policy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/extension_prefs.cc
diff --git a/extensions/browser/extension_prefs.cc b/extensions/browser/extension_prefs.cc
index 7799f0d04dde7d06fae7238dd78a9b00f5a59883..55a74de3250e37bea950d14e171edf7af3aca47a 100644
--- a/extensions/browser/extension_prefs.cc
+++ b/extensions/browser/extension_prefs.cc
@@ -1692,6 +1692,19 @@ bool ExtensionPrefs::DoNotSync(const std::string& extension_id) const {
return do_not_sync;
}
+int ExtensionPrefs::GetInstallFlags(const std::string& extension_id) const {
+ // TODO(kalman,treib): This is hacky. We should probably just store the
+ // mask of install flags as an int, instead of separate bools for each.
+ int flags = 0;
+ if (IsExtensionBlacklisted(extension_id))
+ flags |= kInstallFlagIsBlacklistedForMalware;
+ if (IsEphemeralApp(extension_id))
+ flags |= kInstallFlagIsEphemeral;
+ if (DoNotSync(extension_id))
+ flags |= kInstallFlagDoNotSync;
+ return flags;
+}
+
base::Time ExtensionPrefs::GetLastLaunchTime(
const std::string& extension_id) const {
const base::DictionaryValue* extension = GetExtensionPref(extension_id);
« no previous file with comments | « extensions/browser/extension_prefs.h ('k') | extensions/browser/management_policy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698