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

Side by Side Diff: content/child/push_messaging/push_provider.cc

Issue 2489883006: Replace registration_id() with registrationId() (Closed)
Patch Set: Rebase Created 4 years, 1 month 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/push_messaging/push_provider.h" 5 #include "content/child/push_messaging/push_provider.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 15 matching lines...) Expand all
26 int CurrentWorkerId() { 26 int CurrentWorkerId() {
27 return WorkerThread::GetCurrentId(); 27 return WorkerThread::GetCurrentId();
28 } 28 }
29 29
30 // Returns the id of the given |service_worker_registration|, which 30 // Returns the id of the given |service_worker_registration|, which
31 // is only available on the implementation of the interface. 31 // is only available on the implementation of the interface.
32 int64_t GetServiceWorkerRegistrationId( 32 int64_t GetServiceWorkerRegistrationId(
33 blink::WebServiceWorkerRegistration* service_worker_registration) { 33 blink::WebServiceWorkerRegistration* service_worker_registration) {
34 return static_cast<WebServiceWorkerRegistrationImpl*>( 34 return static_cast<WebServiceWorkerRegistrationImpl*>(
35 service_worker_registration) 35 service_worker_registration)
36 ->registration_id(); 36 ->registrationId();
37 } 37 }
38 38
39 } // namespace 39 } // namespace
40 40
41 blink::WebPushError PushRegistrationStatusToWebPushError( 41 blink::WebPushError PushRegistrationStatusToWebPushError(
42 PushRegistrationStatus status) { 42 PushRegistrationStatus status) {
43 blink::WebPushError::ErrorType error_type = 43 blink::WebPushError::ErrorType error_type =
44 blink::WebPushError::ErrorTypeAbort; 44 blink::WebPushError::ErrorTypeAbort;
45 switch (status) { 45 switch (status) {
46 case PUSH_REGISTRATION_STATUS_PERMISSION_DENIED: 46 case PUSH_REGISTRATION_STATUS_PERMISSION_DENIED:
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 "supported."; 301 "supported.";
302 } 302 }
303 303
304 callbacks->onError( 304 callbacks->onError(
305 blink::WebPushError(error, blink::WebString::fromUTF8(error_message))); 305 blink::WebPushError(error, blink::WebString::fromUTF8(error_message)));
306 306
307 permission_status_callbacks_.Remove(request_id); 307 permission_status_callbacks_.Remove(request_id);
308 } 308 }
309 309
310 } // namespace content 310 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698