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

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

Issue 2959903002: Revert of Implement dumb URLLoader{Factory} for ServiceWorker script loading (Closed)
Patch Set: pull master and rebase 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 | « no previous file | content/browser/service_worker/service_worker_context_core.h » ('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 <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 wrapper_(new ServiceWorkerContextWrapper(browser_context_.get())), 292 wrapper_(new ServiceWorkerContextWrapper(browser_context_.get())),
293 mock_instance_clients_next_index_(0), 293 mock_instance_clients_next_index_(0),
294 next_thread_id_(0), 294 next_thread_id_(0),
295 mock_render_process_id_(render_process_host_->GetID()), 295 mock_render_process_id_(render_process_host_->GetID()),
296 new_mock_render_process_id_(new_render_process_host_->GetID()), 296 new_mock_render_process_id_(new_render_process_host_->GetID()),
297 weak_factory_(this) { 297 weak_factory_(this) {
298 std::unique_ptr<MockServiceWorkerDatabaseTaskManager> database_task_manager( 298 std::unique_ptr<MockServiceWorkerDatabaseTaskManager> database_task_manager(
299 new MockServiceWorkerDatabaseTaskManager( 299 new MockServiceWorkerDatabaseTaskManager(
300 base::ThreadTaskRunnerHandle::Get())); 300 base::ThreadTaskRunnerHandle::Get()));
301 wrapper_->InitInternal(user_data_directory, std::move(database_task_manager), 301 wrapper_->InitInternal(user_data_directory, std::move(database_task_manager),
302 base::ThreadTaskRunnerHandle::Get(), nullptr, nullptr, 302 base::ThreadTaskRunnerHandle::Get(), nullptr, nullptr);
303 nullptr, nullptr);
304 wrapper_->process_manager()->SetProcessIdForTest(mock_render_process_id()); 303 wrapper_->process_manager()->SetProcessIdForTest(mock_render_process_id());
305 wrapper_->process_manager()->SetNewProcessIdForTest(new_render_process_id()); 304 wrapper_->process_manager()->SetNewProcessIdForTest(new_render_process_id());
306 305
307 scoped_refptr<ServiceWorkerDispatcherHost> dispatcher_host( 306 scoped_refptr<ServiceWorkerDispatcherHost> dispatcher_host(
308 new MockServiceWorkerDispatcherHost( 307 new MockServiceWorkerDispatcherHost(
309 mock_render_process_id_, browser_context_->GetResourceContext(), 308 mock_render_process_id_, browser_context_->GetResourceContext(),
310 this)); 309 this));
311 dispatcher_host->Init(wrapper_.get()); 310 dispatcher_host->Init(wrapper_.get());
312 dispatcher_hosts_[mock_render_process_id_] = std::move(dispatcher_host); 311 dispatcher_hosts_[mock_render_process_id_] = std::move(dispatcher_host);
313 312
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 base::Passed(&event_data), base::Passed(&response_callback), 794 base::Passed(&event_data), base::Passed(&response_callback),
796 base::Passed(&callback))); 795 base::Passed(&callback)));
797 } 796 }
798 797
799 EmbeddedWorkerRegistry* EmbeddedWorkerTestHelper::registry() { 798 EmbeddedWorkerRegistry* EmbeddedWorkerTestHelper::registry() {
800 DCHECK(context()); 799 DCHECK(context());
801 return context()->embedded_worker_registry(); 800 return context()->embedded_worker_registry();
802 } 801 }
803 802
804 } // namespace content 803 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/service_worker/service_worker_context_core.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698