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

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

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 #ifndef CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_HANDLE_REFERENCE_H_ 5 #ifndef CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_HANDLE_REFERENCE_H_
6 #define CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_HANDLE_REFERENCE_H_ 6 #define CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_HANDLE_REFERENCE_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "content/common/service_worker/service_worker_types.h" 10 #include "content/common/service_worker/service_worker_types.h"
(...skipping 19 matching lines...) Expand all
30 static scoped_ptr<ServiceWorkerHandleReference> Adopt( 30 static scoped_ptr<ServiceWorkerHandleReference> Adopt(
31 const ServiceWorkerObjectInfo& info, 31 const ServiceWorkerObjectInfo& info,
32 ThreadSafeSender* sender); 32 ThreadSafeSender* sender);
33 33
34 ~ServiceWorkerHandleReference(); 34 ~ServiceWorkerHandleReference();
35 35
36 const ServiceWorkerObjectInfo& info() const { return info_; } 36 const ServiceWorkerObjectInfo& info() const { return info_; }
37 int handle_id() const { return info_.handle_id; } 37 int handle_id() const { return info_.handle_id; }
38 const GURL& url() const { return info_.url; } 38 const GURL& url() const { return info_.url; }
39 blink::WebServiceWorkerState state() const { return info_.state; } 39 blink::WebServiceWorkerState state() const { return info_.state; }
40 const std::string id() const { return info_.version_uuid; }
40 void set_state(blink::WebServiceWorkerState state) { info_.state = state; } 41 void set_state(blink::WebServiceWorkerState state) { info_.state = state; }
41 int64 version_id() const { return info_.version_id; } 42 std::string version_uuid() const { return info_.version_uuid; }
42 43
43 private: 44 private:
44 ServiceWorkerHandleReference(const ServiceWorkerObjectInfo& info, 45 ServiceWorkerHandleReference(const ServiceWorkerObjectInfo& info,
45 ThreadSafeSender* sender, 46 ThreadSafeSender* sender,
46 bool increment_ref_in_ctor); 47 bool increment_ref_in_ctor);
47 ServiceWorkerObjectInfo info_; 48 ServiceWorkerObjectInfo info_;
48 scoped_refptr<ThreadSafeSender> sender_; 49 scoped_refptr<ThreadSafeSender> sender_;
49 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerHandleReference); 50 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerHandleReference);
50 }; 51 };
51 52
52 } // namespace content 53 } // namespace content
53 54
54 #endif // CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_HANDLE_REFERENCE_H_ 55 #endif // CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_HANDLE_REFERENCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698