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

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

Issue 2342523002: Forcibly clear worker ref counts on shutdown. (Closed)
Patch Set: rebase Created 4 years, 2 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') | no next file » | 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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 } 295 }
296 296
297 void MockRenderProcessHost::IncrementSharedWorkerRefCount() { 297 void MockRenderProcessHost::IncrementSharedWorkerRefCount() {
298 ++worker_ref_count_; 298 ++worker_ref_count_;
299 } 299 }
300 300
301 void MockRenderProcessHost::DecrementSharedWorkerRefCount() { 301 void MockRenderProcessHost::DecrementSharedWorkerRefCount() {
302 --worker_ref_count_; 302 --worker_ref_count_;
303 } 303 }
304 304
305 void MockRenderProcessHost::ForceReleaseWorkerRefCounts() {
306 worker_ref_count_ = 0;
307 }
308
309 bool MockRenderProcessHost::IsWorkerRefCountDisabled() {
310 return false;
311 }
312
305 void MockRenderProcessHost::PurgeAndSuspend() {} 313 void MockRenderProcessHost::PurgeAndSuspend() {}
306 314
307 void MockRenderProcessHost::FilterURL(bool empty_allowed, GURL* url) { 315 void MockRenderProcessHost::FilterURL(bool empty_allowed, GURL* url) {
308 RenderProcessHostImpl::FilterURL(this, empty_allowed, url); 316 RenderProcessHostImpl::FilterURL(this, empty_allowed, url);
309 } 317 }
310 318
311 #if defined(ENABLE_WEBRTC) 319 #if defined(ENABLE_WEBRTC)
312 void MockRenderProcessHost::EnableAudioDebugRecordings( 320 void MockRenderProcessHost::EnableAudioDebugRecordings(
313 const base::FilePath& file) { 321 const base::FilePath& file) {
314 } 322 }
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); 385 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin();
378 it != processes_.end(); ++it) { 386 it != processes_.end(); ++it) {
379 if (*it == host) { 387 if (*it == host) {
380 processes_.weak_erase(it); 388 processes_.weak_erase(it);
381 break; 389 break;
382 } 390 }
383 } 391 }
384 } 392 }
385 393
386 } // namespace content 394 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/mock_render_process_host.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698