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

Side by Side Diff: content/child/service_worker/service_worker_network_provider.cc

Issue 1221643014: Service Worker: Migrate to version_uuid and surface ServiceWorker.id. (Chromium 2/3) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
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/child/service_worker/service_worker_network_provider.h" 5 #include "content/child/service_worker/service_worker_network_provider.h"
6 6
7 #include "base/atomic_sequence_num.h" 7 #include "base/atomic_sequence_num.h"
8 #include "content/child/child_thread_impl.h" 8 #include "content/child/child_thread_impl.h"
9 #include "content/child/service_worker/service_worker_provider_context.h" 9 #include "content/child/service_worker/service_worker_provider_context.h"
10 #include "content/common/service_worker/service_worker_messages.h" 10 #include "content/common/service_worker/service_worker_messages.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 ServiceWorkerNetworkProvider::~ServiceWorkerNetworkProvider() { 60 ServiceWorkerNetworkProvider::~ServiceWorkerNetworkProvider() {
61 if (provider_id_ == kInvalidServiceWorkerProviderId) 61 if (provider_id_ == kInvalidServiceWorkerProviderId)
62 return; 62 return;
63 if (!ChildThreadImpl::current()) 63 if (!ChildThreadImpl::current())
64 return; // May be null in some tests. 64 return; // May be null in some tests.
65 ChildThreadImpl::current()->Send( 65 ChildThreadImpl::current()->Send(
66 new ServiceWorkerHostMsg_ProviderDestroyed(provider_id_)); 66 new ServiceWorkerHostMsg_ProviderDestroyed(provider_id_));
67 } 67 }
68 68
69 void ServiceWorkerNetworkProvider::SetServiceWorkerVersionId( 69 void ServiceWorkerNetworkProvider::SetServiceWorkerVersionId(
70 int64 version_id) { 70 std::string version_uuid) {
71 DCHECK_NE(kInvalidServiceWorkerProviderId, provider_id_); 71 DCHECK_NE(kInvalidServiceWorkerProviderId, provider_id_);
72 if (!ChildThreadImpl::current()) 72 if (!ChildThreadImpl::current())
73 return; // May be null in some tests. 73 return; // May be null in some tests.
74 ChildThreadImpl::current()->Send( 74 ChildThreadImpl::current()->Send(
75 new ServiceWorkerHostMsg_SetVersionId(provider_id_, version_id)); 75 new ServiceWorkerHostMsg_SetVersionId(provider_id_, version_uuid));
76 } 76 }
77 77
78 } // namespace content 78 } // namespace content
OLDNEW
« no previous file with comments | « content/child/service_worker/service_worker_network_provider.h ('k') | content/child/service_worker/web_service_worker_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698