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

Side by Side Diff: content/renderer/render_thread_impl.cc

Issue 1134303009: Revert of Revert of Move content:: scheme registrations from chrome/ to content/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/renderer/render_thread_impl.h" 5 #include "content/renderer/render_thread_impl.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 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after
1131 } 1131 }
1132 1132
1133 if (command_line.HasSwitch(switches::kExplicitlyAllowedPorts)) { 1133 if (command_line.HasSwitch(switches::kExplicitlyAllowedPorts)) {
1134 std::string allowed_ports = 1134 std::string allowed_ports =
1135 command_line.GetSwitchValueASCII(switches::kExplicitlyAllowedPorts); 1135 command_line.GetSwitchValueASCII(switches::kExplicitlyAllowedPorts);
1136 net::SetExplicitlyAllowedPorts(allowed_ports); 1136 net::SetExplicitlyAllowedPorts(allowed_ports);
1137 } 1137 }
1138 } 1138 }
1139 1139
1140 void RenderThreadImpl::RegisterSchemes() { 1140 void RenderThreadImpl::RegisterSchemes() {
1141 // swappedout: pages should not be accessible, and should also 1141 // swappedout:
1142 // be treated as empty documents that can commit synchronously.
1143 WebString swappedout_scheme(base::ASCIIToUTF16(kSwappedOutScheme)); 1142 WebString swappedout_scheme(base::ASCIIToUTF16(kSwappedOutScheme));
1144 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(swappedout_scheme); 1143 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(swappedout_scheme);
1145 WebSecurityPolicy::registerURLSchemeAsEmptyDocument(swappedout_scheme); 1144 WebSecurityPolicy::registerURLSchemeAsEmptyDocument(swappedout_scheme);
1145
1146 // chrome:
1147 WebString chrome_scheme(base::ASCIIToUTF16(kChromeUIScheme));
1148 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(chrome_scheme);
1149 WebSecurityPolicy::registerURLSchemeAsNotAllowingJavascriptURLs(
1150 chrome_scheme);
1151 WebSecurityPolicy::registerURLSchemeAsSecure(chrome_scheme);
1152 WebSecurityPolicy::registerURLSchemeAsCORSEnabled(chrome_scheme);
1153
1154 // chrome-devtools:
1155 WebString devtools_scheme(base::ASCIIToUTF16(kChromeDevToolsScheme));
1156 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(devtools_scheme);
1146 } 1157 }
1147 1158
1148 void RenderThreadImpl::NotifyTimezoneChange() { 1159 void RenderThreadImpl::NotifyTimezoneChange() {
1149 NotifyTimezoneChangeOnThisThread(); 1160 NotifyTimezoneChangeOnThisThread();
1150 RenderThread::Get()->PostTaskToAllWebWorkers( 1161 RenderThread::Get()->PostTaskToAllWebWorkers(
1151 base::Bind(&NotifyTimezoneChangeOnThisThread)); 1162 base::Bind(&NotifyTimezoneChangeOnThisThread));
1152 } 1163 }
1153 1164
1154 void RenderThreadImpl::RecordAction(const base::UserMetricsAction& action) { 1165 void RenderThreadImpl::RecordAction(const base::UserMetricsAction& action) {
1155 Send(new ViewHostMsg_UserMetricsRecordAction(action.str_)); 1166 Send(new ViewHostMsg_UserMetricsRecordAction(action.str_));
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after
1885 } 1896 }
1886 1897
1887 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { 1898 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() {
1888 size_t erased = 1899 size_t erased =
1889 RenderThreadImpl::current()->pending_render_frame_connects_.erase( 1900 RenderThreadImpl::current()->pending_render_frame_connects_.erase(
1890 routing_id_); 1901 routing_id_);
1891 DCHECK_EQ(1u, erased); 1902 DCHECK_EQ(1u, erased);
1892 } 1903 }
1893 1904
1894 } // namespace content 1905 } // namespace content
OLDNEW
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698