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

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 }
79
77 base::ProcessHandle MockRenderProcessHost::GetHandle() { 80 base::ProcessHandle MockRenderProcessHost::GetHandle() {
78 return base::kNullProcessHandle; 81 return base::kNullProcessHandle;
79 } 82 }
80 83
81 bool MockRenderProcessHost::Send(IPC::Message* msg) { 84 bool MockRenderProcessHost::Send(IPC::Message* msg) {
82 // Save the message in the sink. 85 // Save the message in the sink.
83 sink_.OnMessageReceived(*msg); 86 sink_.OnMessageReceived(*msg);
84 delete msg; 87 delete msg;
85 return true; 88 return true;
86 } 89 }
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 142
140 void MockRenderProcessHostFactory::Remove(MockRenderProcessHost* host) const { 143 void MockRenderProcessHostFactory::Remove(MockRenderProcessHost* host) const {
141 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); 144 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin();
142 it != processes_.end(); ++it) { 145 it != processes_.end(); ++it) {
143 if (*it == host) { 146 if (*it == host) {
144 processes_.weak_erase(it); 147 processes_.weak_erase(it);
145 break; 148 break;
146 } 149 }
147 } 150 }
148 } 151 }
OLDNEW
« no previous file with comments | « content/browser/renderer_host/mock_render_process_host.h ('k') | content/browser/renderer_host/render_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698