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 "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/process/process_handle.h" | 9 #include "base/process/process_handle.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 return is_isolated_guest_; | 100 return is_isolated_guest_; |
101 } | 101 } |
102 | 102 |
103 StoragePartition* MockRenderProcessHost::GetStoragePartition() const { | 103 StoragePartition* MockRenderProcessHost::GetStoragePartition() const { |
104 return BrowserContext::GetDefaultStoragePartition(browser_context_); | 104 return BrowserContext::GetDefaultStoragePartition(browser_context_); |
105 } | 105 } |
106 | 106 |
107 void MockRenderProcessHost::AddWord(const base::string16& word) { | 107 void MockRenderProcessHost::AddWord(const base::string16& word) { |
108 } | 108 } |
109 | 109 |
| 110 bool MockRenderProcessHost::Shutdown(int exit_code, bool wait) { |
| 111 return true; |
| 112 } |
| 113 |
110 bool MockRenderProcessHost::FastShutdownIfPossible() { | 114 bool MockRenderProcessHost::FastShutdownIfPossible() { |
111 // We aren't actually going to do anything, but set |fast_shutdown_started_| | 115 // We aren't actually going to do anything, but set |fast_shutdown_started_| |
112 // to true so that tests know we've been called. | 116 // to true so that tests know we've been called. |
113 fast_shutdown_started_ = true; | 117 fast_shutdown_started_ = true; |
114 return true; | 118 return true; |
115 } | 119 } |
116 | 120 |
117 bool MockRenderProcessHost::FastShutdownStarted() const { | 121 bool MockRenderProcessHost::FastShutdownStarted() const { |
118 return fast_shutdown_started_; | 122 return fast_shutdown_started_; |
119 } | 123 } |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); | 297 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); |
294 it != processes_.end(); ++it) { | 298 it != processes_.end(); ++it) { |
295 if (*it == host) { | 299 if (*it == host) { |
296 processes_.weak_erase(it); | 300 processes_.weak_erase(it); |
297 break; | 301 break; |
298 } | 302 } |
299 } | 303 } |
300 } | 304 } |
301 | 305 |
302 } // content | 306 } // content |
OLD | NEW |