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

Unified Diff: extensions/browser/extension_prefs.cc

Issue 1164603003: Remove ExtensionPrefs::SetDidExtensionEscalatePermissions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sync_permission_approval
Patch Set: Created 5 years, 7 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: extensions/browser/extension_prefs.cc
diff --git a/extensions/browser/extension_prefs.cc b/extensions/browser/extension_prefs.cc
index 460e0de7297f1e97470323c7a97f2e69406a2f5d..79bd5472555310e8566fd98aa23074017c5ee2bd 100644
--- a/extensions/browser/extension_prefs.cc
+++ b/extensions/browser/extension_prefs.cc
@@ -83,9 +83,6 @@ const char kPrefBlacklistAcknowledged[] = "ack_blacklist";
// run of this profile.
const char kPrefExternalInstallFirstRun[] = "external_first_run";
-// Indicates whether to show an install warning when the user enables.
-const char kExtensionDidEscalatePermissions[] = "install_warning_on_enable";
-
// DO NOT USE, use kPrefDisableReasons instead.
// Indicates whether the extension was updated while it was disabled.
const char kDeprecatedPrefDisableReason[] = "disable_reason";
@@ -729,14 +726,9 @@ bool ExtensionPrefs::SetAlertSystemFirstRun() {
bool ExtensionPrefs::DidExtensionEscalatePermissions(
const std::string& extension_id) const {
- return ReadPrefAsBooleanAndReturn(extension_id,
- kExtensionDidEscalatePermissions);
-}
-
-void ExtensionPrefs::SetDidExtensionEscalatePermissions(
- const Extension* extension, bool did_escalate) {
- UpdateExtensionPref(extension->id(), kExtensionDidEscalatePermissions,
- new base::FundamentalValue(did_escalate));
+ return HasDisableReason(extension_id,
+ Extension::DISABLE_PERMISSIONS_INCREASE) ||
+ HasDisableReason(extension_id, Extension::DISABLE_REMOTE_INSTALL);
}
int ExtensionPrefs::GetDisableReasons(const std::string& extension_id) const {
« chrome/browser/extensions/extension_service.cc ('K') | « extensions/browser/extension_prefs.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698