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/public/test/mock_render_process_host.h" | 5 #include "content/public/test/mock_render_process_host.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 // to true so that tests know we've been called. | 165 // to true so that tests know we've been called. |
166 fast_shutdown_started_ = true; | 166 fast_shutdown_started_ = true; |
167 return true; | 167 return true; |
168 } | 168 } |
169 | 169 |
170 bool MockRenderProcessHost::FastShutdownStarted() const { | 170 bool MockRenderProcessHost::FastShutdownStarted() const { |
171 return fast_shutdown_started_; | 171 return fast_shutdown_started_; |
172 } | 172 } |
173 | 173 |
174 base::ProcessHandle MockRenderProcessHost::GetHandle() const { | 174 base::ProcessHandle MockRenderProcessHost::GetHandle() const { |
175 // Return the current-process handle for the IPC::GetFileHandleForProcess | 175 // Return the current-process handle for the IPC::GetPlatformFileForTransit |
176 // function. | 176 // function. |
177 if (process_handle) | 177 if (process_handle) |
178 return *process_handle; | 178 return *process_handle; |
179 return base::GetCurrentProcessHandle(); | 179 return base::GetCurrentProcessHandle(); |
180 } | 180 } |
181 | 181 |
182 bool MockRenderProcessHost::IsReady() const { | 182 bool MockRenderProcessHost::IsReady() const { |
183 return false; | 183 return false; |
184 } | 184 } |
185 | 185 |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); | 371 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); |
372 it != processes_.end(); ++it) { | 372 it != processes_.end(); ++it) { |
373 if (*it == host) { | 373 if (*it == host) { |
374 processes_.weak_erase(it); | 374 processes_.weak_erase(it); |
375 break; | 375 break; |
376 } | 376 } |
377 } | 377 } |
378 } | 378 } |
379 | 379 |
380 } // namespace content | 380 } // namespace content |
OLD | NEW |