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

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

Issue 7595005: Revert 95815 - 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
« no previous file with comments | « chrome/browser/extensions/extension_prefs.h ('k') | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_prefs.cc
===================================================================
--- chrome/browser/extensions/extension_prefs.cc (revision 95819)
+++ chrome/browser/extensions/extension_prefs.cc (working copy)
@@ -74,11 +74,7 @@
// A preference to control whether an extension is allowed to inject script in
// pages with file URLs.
-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";
+const char kPrefAllowFileAccess[] = "allowFileAccess";
// A preference set by the web store to indicate login information for
// purchased apps.
@@ -808,6 +804,12 @@
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) {
« no previous file with comments | « chrome/browser/extensions/extension_prefs.h ('k') | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698