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

Unified Diff: chrome/browser/extensions/extension_prefs.cc

Issue 7574017: Make extension file URL access opt-in. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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_prefs.cc
diff --git a/chrome/browser/extensions/extension_prefs.cc b/chrome/browser/extensions/extension_prefs.cc
index 49b892f9815f88178bf898ef7f02e42637fa0dd4..88cedb7d64b73cb5901ad4cc6f4e685d07d9e506 100644
--- a/chrome/browser/extensions/extension_prefs.cc
+++ b/chrome/browser/extensions/extension_prefs.cc
@@ -74,7 +74,11 @@ const char kPrefIncognitoEnabled[] = "incognito";
// A preference to control whether an extension is allowed to inject script in
// pages with file URLs.
-const char kPrefAllowFileAccess[] = "allowFileAccess";
+const char kPrefAllowFileAccess[] = "newAllowFileAccess";
+// TODO(jstritar): As part of fixing http://crbug.com/91577, we revoked all
+// extension file access by renaming the pref. We should eventually clean up
+// the old flag and possibly go back to that name.
+// const char kPrefAllowFileAccessOld[] = "allowFileAccess";
// A preference set by the web store to indicate login information for
// purchased apps.
@@ -804,12 +808,6 @@ void ExtensionPrefs::SetAllowFileAccess(const std::string& extension_id,
Value::CreateBooleanValue(allow));
}
-bool ExtensionPrefs::HasAllowFileAccessSetting(
- const std::string& extension_id) const {
- const DictionaryValue* ext = GetExtensionPref(extension_id);
- return ext && ext->HasKey(kPrefAllowFileAccess);
-}
-
ExtensionPrefs::LaunchType ExtensionPrefs::GetLaunchType(
const std::string& extension_id,
ExtensionPrefs::LaunchType default_pref_value) {

Powered by Google App Engine
This is Rietveld 408576698