Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(104)

Side by Side Diff: content/browser/renderer_host/mock_render_process_host.cc

Issue 7888024: Move handle dumpage to the renderer process (so that it works correctly) and factor out redundant... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/browser/renderer_host/mock_render_process_host.h" 5 #include "content/browser/renderer_host/mock_render_process_host.h"
6 6
7 #include "content/browser/child_process_security_policy.h" 7 #include "content/browser/child_process_security_policy.h"
8 8
9 MockRenderProcessHost::MockRenderProcessHost( 9 MockRenderProcessHost::MockRenderProcessHost(
10 content::BrowserContext* browser_context) 10 content::BrowserContext* browser_context)
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 } 67 }
68 68
69 69
70 bool MockRenderProcessHost::FastShutdownIfPossible() { 70 bool MockRenderProcessHost::FastShutdownIfPossible() {
71 // We aren't actually going to do anything, but set |fast_shutdown_started_| 71 // We aren't actually going to do anything, but set |fast_shutdown_started_|
72 // to true so that tests know we've been called. 72 // to true so that tests know we've been called.
73 fast_shutdown_started_ = true; 73 fast_shutdown_started_ = true;
74 return true; 74 return true;
75 } 75 }
76 76
77 void MockRenderProcessHost::DumpHandles() {
78 return;
jam 2011/09/19 17:10:48 nit: not needed
Cris Neckar 2011/09/20 01:22:15 Done.
79 }
80
77 base::ProcessHandle MockRenderProcessHost::GetHandle() { 81 base::ProcessHandle MockRenderProcessHost::GetHandle() {
78 return base::kNullProcessHandle; 82 return base::kNullProcessHandle;
79 } 83 }
80 84
81 bool MockRenderProcessHost::Send(IPC::Message* msg) { 85 bool MockRenderProcessHost::Send(IPC::Message* msg) {
82 // Save the message in the sink. 86 // Save the message in the sink.
83 sink_.OnMessageReceived(*msg); 87 sink_.OnMessageReceived(*msg);
84 delete msg; 88 delete msg;
85 return true; 89 return true;
86 } 90 }
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 143
140 void MockRenderProcessHostFactory::Remove(MockRenderProcessHost* host) const { 144 void MockRenderProcessHostFactory::Remove(MockRenderProcessHost* host) const {
141 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); 145 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin();
142 it != processes_.end(); ++it) { 146 it != processes_.end(); ++it) {
143 if (*it == host) { 147 if (*it == host) {
144 processes_.weak_erase(it); 148 processes_.weak_erase(it);
145 break; 149 break;
146 } 150 }
147 } 151 }
148 } 152 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698