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

Unified Diff: Source/modules/push_messaging/PushController.cpp

Issue 783983003: Push API: move PushManager from Navigator to ServiceWorkerRegistration [switchover 6/6] (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address review comments. Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/push_messaging/PushController.h ('k') | Source/modules/push_messaging/PushManager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/push_messaging/PushController.cpp
diff --git a/Source/modules/push_messaging/PushController.cpp b/Source/modules/push_messaging/PushController.cpp
index 838e55459976be1191eb0de434250b1a28df49b7..914aa3ff8e28a83e41f85fa5e91639151757a15d 100644
--- a/Source/modules/push_messaging/PushController.cpp
+++ b/Source/modules/push_messaging/PushController.cpp
@@ -20,11 +20,13 @@ PassOwnPtrWillBeRawPtr<PushController> PushController::create(WebPushClient* cli
return adoptPtrWillBeNoop(new PushController(client));
}
-WebPushClient* PushController::clientFrom(LocalFrame* frame)
+WebPushClient& PushController::clientFrom(LocalFrame* frame)
{
- if (PushController* controller = PushController::from(frame))
- return controller->client();
- return 0;
+ PushController* controller = PushController::from(frame);
+ ASSERT(controller);
+ WebPushClient* client = controller->client();
+ ASSERT(client);
+ return *client;
}
const char* PushController::supplementName()
« no previous file with comments | « Source/modules/push_messaging/PushController.h ('k') | Source/modules/push_messaging/PushManager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698