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

Side by Side Diff: content/browser/service_worker/embedded_worker_test_helper.cc

Issue 508433002: Remove implicit conversions from scoped_refptr to T* in content/browser/service_worker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 | « no previous file | content/browser/service_worker/service_worker_browsertest.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/service_worker/embedded_worker_test_helper.h" 5 #include "content/browser/service_worker/embedded_worker_test_helper.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 15 matching lines...) Expand all
26 wrapper_->InitInternal(base::FilePath(), 26 wrapper_->InitInternal(base::FilePath(),
27 base::MessageLoopProxy::current(), 27 base::MessageLoopProxy::current(),
28 base::MessageLoopProxy::current(), 28 base::MessageLoopProxy::current(),
29 base::MessageLoopProxy::current(), 29 base::MessageLoopProxy::current(),
30 NULL); 30 NULL);
31 wrapper_->process_manager()->SetProcessIdForTest(mock_render_process_id); 31 wrapper_->process_manager()->SetProcessIdForTest(mock_render_process_id);
32 registry()->AddChildProcessSender(mock_render_process_id, this); 32 registry()->AddChildProcessSender(mock_render_process_id, this);
33 } 33 }
34 34
35 EmbeddedWorkerTestHelper::~EmbeddedWorkerTestHelper() { 35 EmbeddedWorkerTestHelper::~EmbeddedWorkerTestHelper() {
36 if (wrapper_) 36 if (wrapper_.get())
37 wrapper_->Shutdown(); 37 wrapper_->Shutdown();
38 } 38 }
39 39
40 void EmbeddedWorkerTestHelper::SimulateAddProcessToWorker( 40 void EmbeddedWorkerTestHelper::SimulateAddProcessToWorker(
41 int embedded_worker_id, 41 int embedded_worker_id,
42 int process_id) { 42 int process_id) {
43 EmbeddedWorkerInstance* worker = registry()->GetWorker(embedded_worker_id); 43 EmbeddedWorkerInstance* worker = registry()->GetWorker(embedded_worker_id);
44 ASSERT_TRUE(worker); 44 ASSERT_TRUE(worker);
45 registry()->AddChildProcessSender(process_id, this); 45 registry()->AddChildProcessSender(process_id, this);
46 worker->AddProcessReference(process_id); 46 worker->AddProcessReference(process_id);
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 request_id, 287 request_id,
288 request)); 288 request));
289 } 289 }
290 290
291 EmbeddedWorkerRegistry* EmbeddedWorkerTestHelper::registry() { 291 EmbeddedWorkerRegistry* EmbeddedWorkerTestHelper::registry() {
292 DCHECK(context()); 292 DCHECK(context());
293 return context()->embedded_worker_registry(); 293 return context()->embedded_worker_registry();
294 } 294 }
295 295
296 } // namespace content 296 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/service_worker/service_worker_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698