| OLD | NEW |
| 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 Loading... |
| 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: | 1141 // swappedout: pages should not be accessible, and should also |
| 1142 // be treated as empty documents that can commit synchronously. |
| 1142 WebString swappedout_scheme(base::ASCIIToUTF16(kSwappedOutScheme)); | 1143 WebString swappedout_scheme(base::ASCIIToUTF16(kSwappedOutScheme)); |
| 1143 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(swappedout_scheme); | 1144 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(swappedout_scheme); |
| 1144 WebSecurityPolicy::registerURLSchemeAsEmptyDocument(swappedout_scheme); | 1145 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); | |
| 1157 } | 1146 } |
| 1158 | 1147 |
| 1159 void RenderThreadImpl::NotifyTimezoneChange() { | 1148 void RenderThreadImpl::NotifyTimezoneChange() { |
| 1160 NotifyTimezoneChangeOnThisThread(); | 1149 NotifyTimezoneChangeOnThisThread(); |
| 1161 RenderThread::Get()->PostTaskToAllWebWorkers( | 1150 RenderThread::Get()->PostTaskToAllWebWorkers( |
| 1162 base::Bind(&NotifyTimezoneChangeOnThisThread)); | 1151 base::Bind(&NotifyTimezoneChangeOnThisThread)); |
| 1163 } | 1152 } |
| 1164 | 1153 |
| 1165 void RenderThreadImpl::RecordAction(const base::UserMetricsAction& action) { | 1154 void RenderThreadImpl::RecordAction(const base::UserMetricsAction& action) { |
| 1166 Send(new ViewHostMsg_UserMetricsRecordAction(action.str_)); | 1155 Send(new ViewHostMsg_UserMetricsRecordAction(action.str_)); |
| (...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1896 } | 1885 } |
| 1897 | 1886 |
| 1898 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { | 1887 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { |
| 1899 size_t erased = | 1888 size_t erased = |
| 1900 RenderThreadImpl::current()->pending_render_frame_connects_.erase( | 1889 RenderThreadImpl::current()->pending_render_frame_connects_.erase( |
| 1901 routing_id_); | 1890 routing_id_); |
| 1902 DCHECK_EQ(1u, erased); | 1891 DCHECK_EQ(1u, erased); |
| 1903 } | 1892 } |
| 1904 | 1893 |
| 1905 } // namespace content | 1894 } // namespace content |
| OLD | NEW |