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

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

Issue 1865913005: Nuke WebPassOwnPtr<T> and replace it with std::unique_ptr<T>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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_WEB_SERVICE_WORKER_REGISTRATION_IMPL_H_ 5 #ifndef CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_REGISTRATION_IMPL_H_
6 #define CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_REGISTRATION_IMPL_H_ 6 #define CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_REGISTRATION_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "base/memory/scoped_ptr.h"
15 #include "content/common/content_export.h" 16 #include "content/common/content_export.h"
16 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWor kerRegistration.h" 17 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWor kerRegistration.h"
17 18
18 namespace blink { 19 namespace blink {
19 class WebServiceWorkerRegistrationProxy; 20 class WebServiceWorkerRegistrationProxy;
20 } 21 }
21 22
22 namespace content { 23 namespace content {
23 24
24 class ServiceWorkerRegistrationHandleReference; 25 class ServiceWorkerRegistrationHandleReference;
(...skipping 30 matching lines...) Expand all
55 void unregister(blink::WebServiceWorkerProvider* provider, 56 void unregister(blink::WebServiceWorkerProvider* provider,
56 WebServiceWorkerUnregistrationCallbacks* callbacks) override; 57 WebServiceWorkerUnregistrationCallbacks* callbacks) override;
57 58
58 int64_t registration_id() const; 59 int64_t registration_id() const;
59 60
60 using WebServiceWorkerRegistrationHandle = 61 using WebServiceWorkerRegistrationHandle =
61 blink::WebServiceWorkerRegistration::Handle; 62 blink::WebServiceWorkerRegistration::Handle;
62 63
63 // Creates WebServiceWorkerRegistrationHandle object that owns a reference to 64 // Creates WebServiceWorkerRegistrationHandle object that owns a reference to
64 // the given WebServiceWorkerRegistrationImpl object. 65 // the given WebServiceWorkerRegistrationImpl object.
65 static blink::WebPassOwnPtr<WebServiceWorkerRegistrationHandle> CreateHandle( 66 static std::unique_ptr<WebServiceWorkerRegistrationHandle> CreateHandle(
66 const scoped_refptr<WebServiceWorkerRegistrationImpl>& registration); 67 const scoped_refptr<WebServiceWorkerRegistrationImpl>& registration);
67 68
68 // Same with CreateHandle(), but returns a raw pointer to the handle w/ its 69 // Same with CreateHandle(), but returns a raw pointer to the handle w/ its
69 // ownership instead. The caller must manage the ownership. This function must 70 // ownership instead. The caller must manage the ownership. This function must
70 // be used only for passing the handle to Blink API that does not support 71 // be used only for passing the handle to Blink API that does not support
71 // blink::WebPassOwnPtr. 72 // blink::WebPassOwnPtr.
72 static WebServiceWorkerRegistrationHandle* CreateLeakyHandle( 73 static WebServiceWorkerRegistrationHandle* CreateLeakyHandle(
73 const scoped_refptr<WebServiceWorkerRegistrationImpl>& registration); 74 const scoped_refptr<WebServiceWorkerRegistrationImpl>& registration);
74 75
75 private: 76 private:
(...skipping 22 matching lines...) Expand all
98 blink::WebServiceWorkerRegistrationProxy* proxy_; 99 blink::WebServiceWorkerRegistrationProxy* proxy_;
99 100
100 std::vector<QueuedTask> queued_tasks_; 101 std::vector<QueuedTask> queued_tasks_;
101 102
102 DISALLOW_COPY_AND_ASSIGN(WebServiceWorkerRegistrationImpl); 103 DISALLOW_COPY_AND_ASSIGN(WebServiceWorkerRegistrationImpl);
103 }; 104 };
104 105
105 } // namespace content 106 } // namespace content
106 107
107 #endif // CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_REGISTRATION_IMPL_H_ 108 #endif // CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_REGISTRATION_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698