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

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

Issue 2943463002: Implement dumb URLLoader{Factory} for ServiceWorker script loading (Closed)
Patch Set: rebased Created 3 years, 6 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);
303 wrapper_->process_manager()->SetProcessIdForTest(mock_render_process_id()); 304 wrapper_->process_manager()->SetProcessIdForTest(mock_render_process_id());
304 wrapper_->process_manager()->SetNewProcessIdForTest(new_render_process_id()); 305 wrapper_->process_manager()->SetNewProcessIdForTest(new_render_process_id());
305 306
306 scoped_refptr<ServiceWorkerDispatcherHost> dispatcher_host( 307 scoped_refptr<ServiceWorkerDispatcherHost> dispatcher_host(
307 new MockServiceWorkerDispatcherHost( 308 new MockServiceWorkerDispatcherHost(
308 mock_render_process_id_, browser_context_->GetResourceContext(), 309 mock_render_process_id_, browser_context_->GetResourceContext(),
309 this)); 310 this));
310 dispatcher_host->Init(wrapper_.get()); 311 dispatcher_host->Init(wrapper_.get());
311 dispatcher_hosts_[mock_render_process_id_] = std::move(dispatcher_host); 312 dispatcher_hosts_[mock_render_process_id_] = std::move(dispatcher_host);
312 313
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
794 base::Passed(&event_data), base::Passed(&response_callback), 795 base::Passed(&event_data), base::Passed(&response_callback),
795 base::Passed(&callback))); 796 base::Passed(&callback)));
796 } 797 }
797 798
798 EmbeddedWorkerRegistry* EmbeddedWorkerTestHelper::registry() { 799 EmbeddedWorkerRegistry* EmbeddedWorkerTestHelper::registry() {
799 DCHECK(context()); 800 DCHECK(context());
800 return context()->embedded_worker_registry(); 801 return context()->embedded_worker_registry();
801 } 802 }
802 803
803 } // namespace content 804 } // 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