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

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

Issue 2929113002: Enable spare RenderProcessHost to be preinitialized. (Closed)
Patch Set: Change creation of storage partition to not break unittests with subtle threading issues Created 3 years, 5 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
« no previous file with comments | « content/public/test/mock_render_process_host.h ('k') | tools/metrics/histograms/enums.xml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 } 360 }
361 361
362 bool MockRenderProcessHost::IsUnused() { 362 bool MockRenderProcessHost::IsUnused() {
363 return is_unused_; 363 return is_unused_;
364 } 364 }
365 365
366 void MockRenderProcessHost::SetIsUsed() { 366 void MockRenderProcessHost::SetIsUsed() {
367 is_unused_ = false; 367 is_unused_ = false;
368 } 368 }
369 369
370 bool MockRenderProcessHost::HostHasNotBeenUsed() {
371 return IsUnused() && listeners_.IsEmpty() && GetWorkerRefCount() == 0;
372 }
373
370 void MockRenderProcessHost::FilterURL(bool empty_allowed, GURL* url) { 374 void MockRenderProcessHost::FilterURL(bool empty_allowed, GURL* url) {
371 RenderProcessHostImpl::FilterURL(this, empty_allowed, url); 375 RenderProcessHostImpl::FilterURL(this, empty_allowed, url);
372 } 376 }
373 377
374 #if BUILDFLAG(ENABLE_WEBRTC) 378 #if BUILDFLAG(ENABLE_WEBRTC)
375 void MockRenderProcessHost::EnableAudioDebugRecordings( 379 void MockRenderProcessHost::EnableAudioDebugRecordings(
376 const base::FilePath& file) { 380 const base::FilePath& file) {
377 } 381 }
378 382
379 void MockRenderProcessHost::DisableAudioDebugRecordings() {} 383 void MockRenderProcessHost::DisableAudioDebugRecordings() {}
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 for (auto it = processes_.begin(); it != processes_.end(); ++it) { 447 for (auto it = processes_.begin(); it != processes_.end(); ++it) {
444 if (it->get() == host) { 448 if (it->get() == host) {
445 it->release(); 449 it->release();
446 processes_.erase(it); 450 processes_.erase(it);
447 break; 451 break;
448 } 452 }
449 } 453 }
450 } 454 }
451 455
452 } // namespace content 456 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/mock_render_process_host.h ('k') | tools/metrics/histograms/enums.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698