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

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

Issue 2701753003: [WIP] off-main-thread loading
Patch Set: small fix Created 3 years, 8 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/service_worker_context_wrapper.h" 5 #include "content/browser/service_worker/service_worker_context_wrapper.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 12 matching lines...) Expand all
23 #include "content/browser/service_worker/embedded_worker_status.h" 23 #include "content/browser/service_worker/embedded_worker_status.h"
24 #include "content/browser/service_worker/service_worker_context_core.h" 24 #include "content/browser/service_worker/service_worker_context_core.h"
25 #include "content/browser/service_worker/service_worker_context_observer.h" 25 #include "content/browser/service_worker/service_worker_context_observer.h"
26 #include "content/browser/service_worker/service_worker_process_manager.h" 26 #include "content/browser/service_worker/service_worker_process_manager.h"
27 #include "content/browser/service_worker/service_worker_quota_client.h" 27 #include "content/browser/service_worker/service_worker_quota_client.h"
28 #include "content/browser/service_worker/service_worker_version.h" 28 #include "content/browser/service_worker/service_worker_version.h"
29 #include "content/browser/storage_partition_impl.h" 29 #include "content/browser/storage_partition_impl.h"
30 #include "content/common/service_worker/service_worker_utils.h" 30 #include "content/common/service_worker/service_worker_utils.h"
31 #include "content/public/browser/browser_context.h" 31 #include "content/public/browser/browser_context.h"
32 #include "content/public/browser/browser_thread.h" 32 #include "content/public/browser/browser_thread.h"
33 #include "mojo/public/cpp/bindings/strong_associated_binding.h"
33 #include "net/base/url_util.h" 34 #include "net/base/url_util.h"
34 #include "storage/browser/quota/quota_manager_proxy.h" 35 #include "storage/browser/quota/quota_manager_proxy.h"
35 #include "storage/browser/quota/special_storage_policy.h" 36 #include "storage/browser/quota/special_storage_policy.h"
36 37
37 namespace content { 38 namespace content {
38 39
39 namespace { 40 namespace {
40 41
41 typedef std::set<std::string> HeaderNameSet; 42 typedef std::set<std::string> HeaderNameSet;
42 base::LazyInstance<HeaderNameSet>::DestructorAtExit g_excluded_header_name_set = 43 base::LazyInstance<HeaderNameSet>::DestructorAtExit g_excluded_header_name_set =
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 context_core_.reset(); 793 context_core_.reset();
793 return; 794 return;
794 } 795 }
795 context_core_.reset(new ServiceWorkerContextCore(context_core_.get(), this)); 796 context_core_.reset(new ServiceWorkerContextCore(context_core_.get(), this));
796 DVLOG(1) << "Restarted ServiceWorkerContextCore successfully."; 797 DVLOG(1) << "Restarted ServiceWorkerContextCore successfully.";
797 798
798 observer_list_->Notify(FROM_HERE, 799 observer_list_->Notify(FROM_HERE,
799 &ServiceWorkerContextObserver::OnStorageWiped); 800 &ServiceWorkerContextObserver::OnStorageWiped);
800 } 801 }
801 802
803 void ServiceWorkerContextWrapper::BindWorkerFetchContext(
804 int render_process_id,
805 int service_worker_provider_id,
806 mojom::ServiceWorkerClientAssociatedPtrInfo client_ptr_info) {
807 DCHECK_CURRENTLY_ON(BrowserThread::IO);
808 context()->BindWorkerFetchContext(render_process_id,
809 service_worker_provider_id,
810 std::move(client_ptr_info));
811 }
812
802 ServiceWorkerContextCore* ServiceWorkerContextWrapper::context() { 813 ServiceWorkerContextCore* ServiceWorkerContextWrapper::context() {
803 DCHECK_CURRENTLY_ON(BrowserThread::IO); 814 DCHECK_CURRENTLY_ON(BrowserThread::IO);
804 return context_core_.get(); 815 return context_core_.get();
805 } 816 }
806 817
807 } // namespace content 818 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698