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

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

Issue 193723003: Identify service worker version at main resource load time. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
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.h" 8 #include "content/child/child_thread.h"
9 #include "content/common/service_worker/service_worker_messages.h" 9 #include "content/common/service_worker/service_worker_messages.h"
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 new ServiceWorkerHostMsg_ProviderCreated(provider_id_)); 42 new ServiceWorkerHostMsg_ProviderCreated(provider_id_));
43 } 43 }
44 44
45 ServiceWorkerNetworkProvider::~ServiceWorkerNetworkProvider() { 45 ServiceWorkerNetworkProvider::~ServiceWorkerNetworkProvider() {
46 if (!ChildThread::current()) 46 if (!ChildThread::current())
47 return; // May be null in some tests. 47 return; // May be null in some tests.
48 ChildThread::current()->Send( 48 ChildThread::current()->Send(
49 new ServiceWorkerHostMsg_ProviderDestroyed(provider_id_)); 49 new ServiceWorkerHostMsg_ProviderDestroyed(provider_id_));
50 } 50 }
51 51
52 void ServiceWorkerNetworkProvider::SetServiceWorkerVersionId(
53 int64 version_id) {
54 if (!ChildThread::current())
55 return; // May be null in some tests.
56 ChildThread::current()->Send(
57 new ServiceWorkerHostMsg_SetVersionId(provider_id_, version_id));
58 }
59
52 } // namespace content 60 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698