summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcevans@chromium.org <cevans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-18 00:07:28 +0000
committercevans@chromium.org <cevans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-18 00:07:28 +0000
commit54202fab4fd326f9e18d60b1a9e37159714688a3 (patch)
treea6d59b10a39f45007d4863f5cf329779a4edf045
parentb51c7c84e2467ac8090866b758691ca3cf6d0d24 (diff)
downloadchromium_src-54202fab4fd326f9e18d60b1a9e37159714688a3.zip
chromium_src-54202fab4fd326f9e18d60b1a9e37159714688a3.tar.gz
chromium_src-54202fab4fd326f9e18d60b1a9e37159714688a3.tar.bz2
Revert 39287 - Chromium pieces to use the WebKit support for isolation file:// documents in
their own unique domains. By default, we use this isolation for security. We provide a command line switch override for developers: allowfileaccessfromfiles BUG=4197 TEST=WebKit test pending Review URL: http://codereview.chromium.org/625001 TBR=abarth@chromium.org Review URL: http://codereview.chromium.org/625007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39304 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/tab_contents/render_view_host_delegate_helper.cc2
-rw-r--r--chrome/common/chrome_switches.cc4
-rw-r--r--chrome/common/chrome_switches.h1
-rw-r--r--chrome/common/render_messages.h2
-rw-r--r--webkit/glue/webpreferences.cc1
-rw-r--r--webkit/glue/webpreferences.h2
-rw-r--r--webkit/tools/test_shell/layout_test_controller.cc11
-rw-r--r--webkit/tools/test_shell/layout_test_controller.h1
-rw-r--r--webkit/tools/test_shell/test_shell.cc1
9 files changed, 0 insertions, 25 deletions
diff --git a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
index 9b3be5d..7ce522d 100644
--- a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
+++ b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
@@ -188,8 +188,6 @@ WebPreferences RenderViewHostDelegateHelper::GetWebkitPrefs(
!command_line.HasSwitch(switches::kDisableSiteSpecificQuirks);
web_prefs.geolocation_enabled =
command_line.HasSwitch(switches::kEnableGeolocation);
- web_prefs.allow_file_access_from_file_urls =
- command_line.HasSwitch(switches::kAllowFileAccessFromFiles);
}
web_prefs.uses_universal_detector =
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index f5f5663..54453ec 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -17,10 +17,6 @@ namespace switches {
// is launched on the command line (e.g. by Selenium). Only needed on Mac.
const char kActivateOnLaunch[] = "activate-on-launch";
-// By default, file:/// URIs cannot read other file:/// URIs. This is an
-// override for developers who need the old behavior for testing.
-const char kAllowFileAccessFromFiles[] = "allow-file-access-from-files";
-
// Allows debugging of sandboxed processes (see zygote_main_linux.cc).
const char kAllowSandboxDebugging[] = "allow-sandbox-debugging";
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index fe61aa5..e50d5e8 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -20,7 +20,6 @@ namespace switches {
// All switches in alphabetical order. The switches should be documented
// alongside the definition of their values in the .cc file.
extern const char kActivateOnLaunch[];
-extern const char kAllowFileAccessFromFiles[];
extern const char kAllowSandboxDebugging[];
extern const char kAlwaysEnableDevTools[];
extern const char kApp[];
diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h
index 3020c81..533c92d 100644
--- a/chrome/common/render_messages.h
+++ b/chrome/common/render_messages.h
@@ -1749,7 +1749,6 @@ struct ParamTraits<WebPreferences> {
WriteParam(m, p.user_style_sheet_enabled);
WriteParam(m, p.user_style_sheet_location);
WriteParam(m, p.allow_universal_access_from_file_urls);
- WriteParam(m, p.allow_file_access_from_file_urls);
WriteParam(m, p.experimental_webgl_enabled);
WriteParam(m, p.geolocation_enabled);
}
@@ -1790,7 +1789,6 @@ struct ParamTraits<WebPreferences> {
ReadParam(m, iter, &p->user_style_sheet_enabled) &&
ReadParam(m, iter, &p->user_style_sheet_location) &&
ReadParam(m, iter, &p->allow_universal_access_from_file_urls) &&
- ReadParam(m, iter, &p->allow_file_access_from_file_urls) &&
ReadParam(m, iter, &p->experimental_webgl_enabled) &&
ReadParam(m, iter, &p->geolocation_enabled);
}
diff --git a/webkit/glue/webpreferences.cc b/webkit/glue/webpreferences.cc
index d14b600..2dcdc80 100644
--- a/webkit/glue/webpreferences.cc
+++ b/webkit/glue/webpreferences.cc
@@ -74,7 +74,6 @@ void WebPreferences::Apply(WebView* web_view) const {
// universal access. Only test shell will enable this.
settings->setAllowUniversalAccessFromFileURLs(
allow_universal_access_from_file_urls);
- settings->setAllowFileAccessFromFileURLs(allow_file_access_from_file_urls);
// We prevent WebKit from checking if it needs to add a "text direction"
// submenu to a context menu. it is not only because we don't need the result
diff --git a/webkit/glue/webpreferences.h b/webkit/glue/webpreferences.h
index daf0043..58daa58 100644
--- a/webkit/glue/webpreferences.h
+++ b/webkit/glue/webpreferences.h
@@ -58,7 +58,6 @@ struct WebPreferences {
GURL user_style_sheet_location;
bool allow_universal_access_from_file_urls;
- bool allow_file_access_from_file_urls;
bool experimental_webgl_enabled;
@@ -101,7 +100,6 @@ struct WebPreferences {
tabs_to_links(true),
user_style_sheet_enabled(false),
allow_universal_access_from_file_urls(false),
- allow_file_access_from_file_urls(false),
experimental_webgl_enabled(false),
geolocation_enabled(false) {
}
diff --git a/webkit/tools/test_shell/layout_test_controller.cc b/webkit/tools/test_shell/layout_test_controller.cc
index f06de24..0552538d 100644
--- a/webkit/tools/test_shell/layout_test_controller.cc
+++ b/webkit/tools/test_shell/layout_test_controller.cc
@@ -152,7 +152,6 @@ LayoutTestController::LayoutTestController(TestShell* shell) :
BindMethod("evaluateScriptInIsolatedWorld", &LayoutTestController::evaluateScriptInIsolatedWorld);
BindMethod("overridePreference", &LayoutTestController::overridePreference);
BindMethod("setAllowUniversalAccessFromFileURLs", &LayoutTestController::setAllowUniversalAccessFromFileURLs);
- BindMethod("setAllowFileAccessFromFileURLs", &LayoutTestController::setAllowFileAccessFromFileURLs);
BindMethod("setTimelineProfilingEnabled", &LayoutTestController::setTimelineProfilingEnabled);
BindMethod("evaluateInWebInspector", &LayoutTestController::evaluateInWebInspector);
BindMethod("forceRedSelectionColors", &LayoutTestController::forceRedSelectionColors);
@@ -900,16 +899,6 @@ void LayoutTestController::setAllowUniversalAccessFromFileURLs(
result->SetNull();
}
-void LayoutTestController::setAllowFileAccessFromFileURLs(
- const CppArgumentList& args, CppVariant* result) {
- if (args.size() > 0 && args[0].isBool()) {
- WebPreferences* prefs = shell_->GetWebPreferences();
- prefs->allow_file_access_from_file_urls = args[0].value.boolValue;
- prefs->Apply(shell_->webView());
- }
- result->SetNull();
-}
-
// Need these conversions because the format of the value for booleans
// may vary - for example, on mac "1" and "0" are used for boolean.
bool LayoutTestController::CppVariantToBool(const CppVariant& value) {
diff --git a/webkit/tools/test_shell/layout_test_controller.h b/webkit/tools/test_shell/layout_test_controller.h
index 50d7c91..8705468 100644
--- a/webkit/tools/test_shell/layout_test_controller.h
+++ b/webkit/tools/test_shell/layout_test_controller.h
@@ -199,7 +199,6 @@ class LayoutTestController : public CppBoundClass {
void evaluateScriptInIsolatedWorld(const CppArgumentList& args, CppVariant* result);
void overridePreference(const CppArgumentList& args, CppVariant* result);
void setAllowUniversalAccessFromFileURLs(const CppArgumentList& args, CppVariant* result);
- void setAllowFileAccessFromFileURLs(const CppArgumentList& args, CppVariant* result);
// The fallback method is called when a nonexistent method is called on
// the layout test controller object.
diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc
index f7449b5..8d37a81 100644
--- a/webkit/tools/test_shell/test_shell.cc
+++ b/webkit/tools/test_shell/test_shell.cc
@@ -464,7 +464,6 @@ void TestShell::ResetWebPreferences() {
web_prefs_->local_storage_enabled = true;
web_prefs_->application_cache_enabled = true;
web_prefs_->databases_enabled = true;
- web_prefs_->allow_file_access_from_file_urls = true;
// LayoutTests were written with Safari Mac in mind which does not allow
// tabbing to links by default.
web_prefs_->tabs_to_links = false;