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

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

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

Powered by Google App Engine
This is Rietveld 408576698