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) { |