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

Side by Side Diff: content/child/service_worker/service_worker_registration_handle_reference.h

Issue 2771823002: Implement updateViaCache flag and no-cache by default for main service worker scripts
Patch Set: fix IPC Created 3 years, 4 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 #ifndef CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_REGISTRATION_HANDLE_REFERENC E_H_ 5 #ifndef CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_REGISTRATION_HANDLE_REFERENC E_H_
6 #define CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_REGISTRATION_HANDLE_REFERENC E_H_ 6 #define CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_REGISTRATION_HANDLE_REFERENC E_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 23 matching lines...) Expand all
34 // ref-count. 34 // ref-count.
35 static std::unique_ptr<ServiceWorkerRegistrationHandleReference> Adopt( 35 static std::unique_ptr<ServiceWorkerRegistrationHandleReference> Adopt(
36 const ServiceWorkerRegistrationObjectInfo& info, 36 const ServiceWorkerRegistrationObjectInfo& info,
37 ThreadSafeSender* sender); 37 ThreadSafeSender* sender);
38 38
39 ~ServiceWorkerRegistrationHandleReference(); 39 ~ServiceWorkerRegistrationHandleReference();
40 40
41 const ServiceWorkerRegistrationObjectInfo& info() const { return info_; } 41 const ServiceWorkerRegistrationObjectInfo& info() const { return info_; }
42 int handle_id() const { return info_.handle_id; } 42 int handle_id() const { return info_.handle_id; }
43 GURL scope() const { return info_.options.scope; } 43 GURL scope() const { return info_.options.scope; }
44 blink::WebServiceWorkerUpdateViaCache update_via_cache() const {
45 return info_.options.update_via_cache;
46 }
44 int64_t registration_id() const { return info_.registration_id; } 47 int64_t registration_id() const { return info_.registration_id; }
45 48
46 private: 49 private:
47 ServiceWorkerRegistrationHandleReference( 50 ServiceWorkerRegistrationHandleReference(
48 const ServiceWorkerRegistrationObjectInfo& info, 51 const ServiceWorkerRegistrationObjectInfo& info,
49 ThreadSafeSender* sender, 52 ThreadSafeSender* sender,
50 bool increment_ref_in_ctor); 53 bool increment_ref_in_ctor);
51 54
52 ServiceWorkerRegistrationObjectInfo info_; 55 ServiceWorkerRegistrationObjectInfo info_;
53 scoped_refptr<ThreadSafeSender> sender_; 56 scoped_refptr<ThreadSafeSender> sender_;
54 57
55 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRegistrationHandleReference); 58 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRegistrationHandleReference);
56 }; 59 };
57 60
58 } // namespace content 61 } // namespace content
59 62
60 #endif // CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_REGISTRATION_HANDLE_REFER ENCE_H_ 63 #endif // CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_REGISTRATION_HANDLE_REFER ENCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698