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

Side by Side Diff: chrome/renderer/render_thread.cc

Issue 6277018: revert r71405 as it is causing ui test failures: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/renderer/render_thread.h" 5 #include "chrome/renderer/render_thread.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 846 matching lines...) Expand 10 before | Expand all | Expand 10 after
857 WebKit::initialize(webkit_client_.get()); 857 WebKit::initialize(webkit_client_.get());
858 858
859 WebScriptController::enableV8SingleThreadMode(); 859 WebScriptController::enableV8SingleThreadMode();
860 860
861 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 861 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
862 862
863 // chrome: pages should not be accessible by normal content, and should 863 // chrome: pages should not be accessible by normal content, and should
864 // also be unable to script anything but themselves (to help limit the damage 864 // also be unable to script anything but themselves (to help limit the damage
865 // that a corrupt chrome: page could cause). 865 // that a corrupt chrome: page could cause).
866 WebString chrome_ui_scheme(ASCIIToUTF16(chrome::kChromeUIScheme)); 866 WebString chrome_ui_scheme(ASCIIToUTF16(chrome::kChromeUIScheme));
867 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(chrome_ui_scheme); 867 if (command_line.HasSwitch(switches::kNewChromeUISecurityModel)) {
868 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(chrome_ui_scheme);
869 } else {
870 WebSecurityPolicy::registerURLSchemeAsLocal(chrome_ui_scheme);
871 WebSecurityPolicy::registerURLSchemeAsNoAccess(chrome_ui_scheme);
872 }
868 873
869 // chrome-extension: resources shouldn't trigger insecure content warnings. 874 // chrome-extension: resources shouldn't trigger insecure content warnings.
870 WebString extension_scheme(ASCIIToUTF16(chrome::kExtensionScheme)); 875 WebString extension_scheme(ASCIIToUTF16(chrome::kExtensionScheme));
871 WebSecurityPolicy::registerURLSchemeAsSecure(extension_scheme); 876 WebSecurityPolicy::registerURLSchemeAsSecure(extension_scheme);
872 877
873 #if defined(OS_WIN) 878 #if defined(OS_WIN)
874 // We don't yet support Gears on non-Windows, so don't tell pages that we do. 879 // We don't yet support Gears on non-Windows, so don't tell pages that we do.
875 RegisterExtension(extensions_v8::GearsExtension::Get(), false); 880 RegisterExtension(extensions_v8::GearsExtension::Get(), false);
876 #endif 881 #endif
877 RegisterExtension(extensions_v8::LoadTimesExtension::Get(), false); 882 RegisterExtension(extensions_v8::LoadTimesExtension::Get(), false);
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
1132 } 1137 }
1133 1138
1134 return false; 1139 return false;
1135 } 1140 }
1136 1141
1137 void RenderThread::RegisterExtension(v8::Extension* extension, 1142 void RenderThread::RegisterExtension(v8::Extension* extension,
1138 bool restrict_to_extensions) { 1143 bool restrict_to_extensions) {
1139 WebScriptController::registerExtension(extension); 1144 WebScriptController::registerExtension(extension);
1140 v8_extensions_[extension->name()] = restrict_to_extensions; 1145 v8_extensions_[extension->name()] = restrict_to_extensions;
1141 } 1146 }
OLDNEW
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698