summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-24 23:33:25 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-24 23:33:25 +0000
commit9df334c1c572250320fdb994f7b7293131be9940 (patch)
tree89d39b372bfe2cff06362dc9a242c3de42dfa967 /chrome
parent420914939dd9d240be781df2492bdcd87e553973 (diff)
downloadchromium_src-9df334c1c572250320fdb994f7b7293131be9940.zip
chromium_src-9df334c1c572250320fdb994f7b7293131be9940.tar.gz
chromium_src-9df334c1c572250320fdb994f7b7293131be9940.tar.bz2
revert r71405 as it is causing ui test failures:
Make new chrome UI security model the default. allows us to update URL in chrome://settings when the user navigates within it. BUG=57485 TEST=manual Review URL: http://codereview.chromium.org/6277018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72420 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/renderer_host/browser_render_process_host.cc1
-rw-r--r--chrome/browser/resources/options/options_page.js3
-rw-r--r--chrome/common/chrome_switches.cc3
-rw-r--r--chrome/common/chrome_switches.h1
-rw-r--r--chrome/renderer/render_thread.cc7
5 files changed, 12 insertions, 3 deletions
diff --git a/chrome/browser/renderer_host/browser_render_process_host.cc b/chrome/browser/renderer_host/browser_render_process_host.cc
index e651ccc..3ebcacf 100644
--- a/chrome/browser/renderer_host/browser_render_process_host.cc
+++ b/chrome/browser/renderer_host/browser_render_process_host.cc
@@ -721,6 +721,7 @@ void BrowserRenderProcessHost::PropagateBrowserCommandLineToRenderer(
switches::kRemoteShellPort,
switches::kEnablePepperTesting,
switches::kAllowOutdatedPlugins,
+ switches::kNewChromeUISecurityModel,
switches::kEnableRemoting,
switches::kEnableClickToPlay,
switches::kEnableResourceContentSettings,
diff --git a/chrome/browser/resources/options/options_page.js b/chrome/browser/resources/options/options_page.js
index 2c22e4d..510e1e57 100644
--- a/chrome/browser/resources/options/options_page.js
+++ b/chrome/browser/resources/options/options_page.js
@@ -499,8 +499,7 @@ cr.define('options', function() {
OptionsPage.updateManagedBannerVisibility();
// Recent webkit change no longer allows url change from "chrome://".
- window.history.pushState({pageName: this.name}, this.title,
- '/' + this.name);
+ window.history.pushState({pageName: this.name}, this.title);
}
if (this.tab) {
this.tab.classList.add('navbar-item-selected');
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index abb57d0..64524ee 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -850,6 +850,9 @@ const char kNaClLoaderProcess[] = "nacl-loader";
// Causes the Native Client process to display a dialog on launch.
const char kNaClStartupDialog[] = "nacl-startup-dialog";
+// Enables the new security model for "chrome" URLs.
+const char kNewChromeUISecurityModel[] = "new-chrome-ui-security-model";
+
// Disables the default browser check. Useful for UI/browser tests where we
// want to avoid having the default browser info-bar displayed.
const char kNoDefaultBrowserCheck[] = "no-default-browser-check";
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index 9536841..1d718d5 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -244,6 +244,7 @@ extern const char kNaClDebugPorts[];
extern const char kNaClBrokerProcess[];
extern const char kNaClLoaderProcess[];
extern const char kNaClStartupDialog[];
+extern const char kNewChromeUISecurityModel[];
extern const char kNoDefaultBrowserCheck[];
extern const char kNoEvents[];
extern const char kNoExperiments[];
diff --git a/chrome/renderer/render_thread.cc b/chrome/renderer/render_thread.cc
index fd55fe8..a80fc7bd 100644
--- a/chrome/renderer/render_thread.cc
+++ b/chrome/renderer/render_thread.cc
@@ -864,7 +864,12 @@ void RenderThread::EnsureWebKitInitialized() {
// also be unable to script anything but themselves (to help limit the damage
// that a corrupt chrome: page could cause).
WebString chrome_ui_scheme(ASCIIToUTF16(chrome::kChromeUIScheme));
- WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(chrome_ui_scheme);
+ if (command_line.HasSwitch(switches::kNewChromeUISecurityModel)) {
+ WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(chrome_ui_scheme);
+ } else {
+ WebSecurityPolicy::registerURLSchemeAsLocal(chrome_ui_scheme);
+ WebSecurityPolicy::registerURLSchemeAsNoAccess(chrome_ui_scheme);
+ }
// chrome-extension: resources shouldn't trigger insecure content warnings.
WebString extension_scheme(ASCIIToUTF16(chrome::kExtensionScheme));