| Index: content/browser/service_worker/service_worker_context_core.cc
|
| diff --git a/content/browser/service_worker/service_worker_context_core.cc b/content/browser/service_worker/service_worker_context_core.cc
|
| index 9cb2cbecef8b2969c06f0e9e6302e0cd5b85cf09..b13e5e5165624a33cf5dcd6d68f2aa69041a1d16 100644
|
| --- a/content/browser/service_worker/service_worker_context_core.cc
|
| +++ b/content/browser/service_worker/service_worker_context_core.cc
|
| @@ -26,12 +26,32 @@ ServiceWorkerContextCore::ServiceWorkerContextCore(
|
| path_ = user_data_directory.Append(kServiceWorkerDirectory);
|
| }
|
|
|
| +ServiceWorkerContextCore::~ServiceWorkerContextCore() {
|
| +}
|
| +
|
| +ServiceWorkerProviderHost* ServiceWorkerContextCore::GetProviderHost(
|
| + int process_id, int provider_id) {
|
| + ProcessToProvidersMap::iterator it1 = providers_map_.find(process_id);
|
| + if (it1 == providers_map_.end())
|
| + return NULL;
|
| + ServiceWorkerProviderHostMap::iterator it2 = it1->second->find(provider_id);
|
| + if (it2 == it1->second->end())
|
| + return NULL;
|
| + return it2->second;
|
| +}
|
| +
|
| +void ServiceWorkerContextCore::AttachProviderHostMap(
|
| + int process_id, ServiceWorkerProviderHostMap* map) {
|
| + providers_map_[process_id] = map;
|
| +}
|
| +
|
| +void ServiceWorkerContextCore::DetachProviderHostMap(int process_id) {
|
| + providers_map_.erase(process_id);
|
| +}
|
| +
|
| bool ServiceWorkerContextCore::IsEnabled() {
|
| return CommandLine::ForCurrentProcess()->HasSwitch(
|
| switches::kEnableServiceWorker);
|
| }
|
|
|
| -ServiceWorkerContextCore::~ServiceWorkerContextCore() {
|
| -}
|
| -
|
| } // namespace content
|
|
|