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

Unified Diff: Source/modules/notifications/NotificationController.h

Issue 268353004: NotificationController::clientFrom() should return a reference (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: Source/modules/notifications/NotificationController.h
diff --git a/Source/modules/notifications/NotificationController.h b/Source/modules/notifications/NotificationController.h
index d2dee1cc2db7e1b8b3094809b005bcf4feed2213..52e22bf90536002ba78d17ab187c6005358a265d 100644
--- a/Source/modules/notifications/NotificationController.h
+++ b/Source/modules/notifications/NotificationController.h
@@ -42,15 +42,15 @@ public:
static PassOwnPtr<NotificationController> create(PassOwnPtr<NotificationClient>);
static const char* supplementName();
static NotificationController* from(LocalFrame* frame) { return static_cast<NotificationController*>(Supplement<LocalFrame>::from(frame, supplementName())); }
- static NotificationClient* clientFrom(LocalFrame*);
-
- NotificationClient* client() { return m_client.get(); }
+ static NotificationClient& clientFrom(LocalFrame*);
virtual void trace(Visitor* visitor) OVERRIDE { Supplement<LocalFrame>::trace(visitor); }
private:
explicit NotificationController(PassOwnPtr<NotificationClient>);
+ NotificationClient& client() { return *m_client; }
+
OwnPtr<NotificationClient> m_client;
};
« no previous file with comments | « Source/modules/notifications/Notification.cpp ('k') | Source/modules/notifications/NotificationController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698