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