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 1102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1113 !is_impl_side_painting_enabled_) | 1113 !is_impl_side_painting_enabled_) |
1114 SkGraphics::SetResourceCacheTotalByteLimit(0u); | 1114 SkGraphics::SetResourceCacheTotalByteLimit(0u); |
1115 | 1115 |
1116 SkGraphics::SetResourceCacheSingleAllocationByteLimit( | 1116 SkGraphics::SetResourceCacheSingleAllocationByteLimit( |
1117 kImageCacheSingleAllocationByteLimit); | 1117 kImageCacheSingleAllocationByteLimit); |
1118 | 1118 |
1119 if (command_line.HasSwitch(switches::kMemoryMetrics)) { | 1119 if (command_line.HasSwitch(switches::kMemoryMetrics)) { |
1120 memory_observer_.reset(new MemoryObserver()); | 1120 memory_observer_.reset(new MemoryObserver()); |
1121 message_loop()->AddTaskObserver(memory_observer_.get()); | 1121 message_loop()->AddTaskObserver(memory_observer_.get()); |
1122 } | 1122 } |
| 1123 |
| 1124 if (command_line.HasSwitch(switches::kExplicitlyAllowedPorts)) { |
| 1125 std::string allowed_ports = |
| 1126 command_line.GetSwitchValueASCII(switches::kExplicitlyAllowedPorts); |
| 1127 net::SetExplicitlyAllowedPorts(allowed_ports); |
| 1128 } |
1123 } | 1129 } |
1124 | 1130 |
1125 void RenderThreadImpl::RegisterSchemes() { | 1131 void RenderThreadImpl::RegisterSchemes() { |
1126 // swappedout: pages should not be accessible, and should also | 1132 // swappedout: pages should not be accessible, and should also |
1127 // be treated as empty documents that can commit synchronously. | 1133 // be treated as empty documents that can commit synchronously. |
1128 WebString swappedout_scheme(base::ASCIIToUTF16(kSwappedOutScheme)); | 1134 WebString swappedout_scheme(base::ASCIIToUTF16(kSwappedOutScheme)); |
1129 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(swappedout_scheme); | 1135 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(swappedout_scheme); |
1130 WebSecurityPolicy::registerURLSchemeAsEmptyDocument(swappedout_scheme); | 1136 WebSecurityPolicy::registerURLSchemeAsEmptyDocument(swappedout_scheme); |
1131 } | 1137 } |
1132 | 1138 |
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1844 } | 1850 } |
1845 | 1851 |
1846 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { | 1852 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { |
1847 size_t erased = | 1853 size_t erased = |
1848 RenderThreadImpl::current()->pending_render_frame_connects_.erase( | 1854 RenderThreadImpl::current()->pending_render_frame_connects_.erase( |
1849 routing_id_); | 1855 routing_id_); |
1850 DCHECK_EQ(1u, erased); | 1856 DCHECK_EQ(1u, erased); |
1851 } | 1857 } |
1852 | 1858 |
1853 } // namespace content | 1859 } // namespace content |
OLD | NEW |