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

Side by Side Diff: content/public/test/mock_render_process_host.cc

Issue 11147026: Initial refactor to get profiles to propagate storage partition details. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing Android's BrowserContext. Created 8 years, 1 month 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) 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.h" 8 #include "base/message_loop.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "content/browser/child_process_security_policy_impl.h" 10 #include "content/browser/child_process_security_policy_impl.h"
11 #include "content/browser/renderer_host/render_process_host_impl.h" 11 #include "content/browser/renderer_host/render_process_host_impl.h"
12 #include "content/common/child_process_host_impl.h" 12 #include "content/common/child_process_host_impl.h"
13 #include "content/public/browser/notification_service.h" 13 #include "content/public/browser/notification_service.h"
14 #include "content/public/browser/notification_types.h" 14 #include "content/public/browser/notification_types.h"
15 #include "content/public/browser/storage_partition.h"
15 16
16 namespace content { 17 namespace content {
17 18
18 MockRenderProcessHost::MockRenderProcessHost( 19 MockRenderProcessHost::MockRenderProcessHost(
19 BrowserContext* browser_context) 20 BrowserContext* browser_context)
20 : transport_dib_(NULL), 21 : transport_dib_(NULL),
21 bad_msg_count_(0), 22 bad_msg_count_(0),
22 factory_(NULL), 23 factory_(NULL),
23 id_(ChildProcessHostImpl::GenerateChildProcessUniqueId()), 24 id_(ChildProcessHostImpl::GenerateChildProcessUniqueId()),
24 browser_context_(browser_context), 25 browser_context_(browser_context),
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 } 77 }
77 78
78 int MockRenderProcessHost::VisibleWidgetCount() const { 79 int MockRenderProcessHost::VisibleWidgetCount() const {
79 return 1; 80 return 1;
80 } 81 }
81 82
82 bool MockRenderProcessHost::IsGuest() const { 83 bool MockRenderProcessHost::IsGuest() const {
83 return false; 84 return false;
84 } 85 }
85 86
87 StoragePartition* MockRenderProcessHost::GetStoragePartition() const {
88 return NULL;
89 }
90
86 void MockRenderProcessHost::AddWord(const string16& word) { 91 void MockRenderProcessHost::AddWord(const string16& word) {
87 } 92 }
88 93
89 bool MockRenderProcessHost::FastShutdownIfPossible() { 94 bool MockRenderProcessHost::FastShutdownIfPossible() {
90 // We aren't actually going to do anything, but set |fast_shutdown_started_| 95 // We aren't actually going to do anything, but set |fast_shutdown_started_|
91 // to true so that tests know we've been called. 96 // to true so that tests know we've been called.
92 fast_shutdown_started_ = true; 97 fast_shutdown_started_ = true;
93 return true; 98 return true;
94 } 99 }
95 100
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); 261 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin();
257 it != processes_.end(); ++it) { 262 it != processes_.end(); ++it) {
258 if (*it == host) { 263 if (*it == host) {
259 processes_.weak_erase(it); 264 processes_.weak_erase(it);
260 break; 265 break;
261 } 266 }
262 } 267 }
263 } 268 }
264 269
265 } // content 270 } // content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698