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

Unified Diff: chrome/browser/extensions/api/sockets_udp/udp_socket_event_dispatcher.cc

Issue 174513003: Move ProfileKeyedAPI implementations to take BrowserContext in the constructor (part 3). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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: chrome/browser/extensions/api/sockets_udp/udp_socket_event_dispatcher.cc
diff --git a/chrome/browser/extensions/api/sockets_udp/udp_socket_event_dispatcher.cc b/chrome/browser/extensions/api/sockets_udp/udp_socket_event_dispatcher.cc
index cadb1dd44b26d3f6baaceefb2d98920a86864c01..1f1f5bc67cf2da2fe008d4a61acd642478e3daac 100644
--- a/chrome/browser/extensions/api/sockets_udp/udp_socket_event_dispatcher.cc
+++ b/chrome/browser/extensions/api/sockets_udp/udp_socket_event_dispatcher.cc
@@ -27,18 +27,20 @@ ProfileKeyedAPIFactory<UDPSocketEventDispatcher>*
}
// static
-UDPSocketEventDispatcher* UDPSocketEventDispatcher::Get(Profile* profile) {
+UDPSocketEventDispatcher* UDPSocketEventDispatcher::Get(
+ content::BrowserContext* context) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
return ProfileKeyedAPIFactory<UDPSocketEventDispatcher>::GetForProfile(
- profile);
+ context);
}
-UDPSocketEventDispatcher::UDPSocketEventDispatcher(Profile* profile)
+UDPSocketEventDispatcher::UDPSocketEventDispatcher(
+ content::BrowserContext* context)
: thread_id_(Socket::kThreadId),
- profile_(profile) {
+ profile_(Profile::FromBrowserContext(context)) {
ApiResourceManager<ResumableUDPSocket>* manager =
- ApiResourceManager<ResumableUDPSocket>::Get(profile);
+ ApiResourceManager<ResumableUDPSocket>::Get(profile_);
DCHECK(manager) << "There is no socket manager. "
"If this assertion is failing during a test, then it is likely that "
"TestExtensionSystem is failing to provide an instance of "

Powered by Google App Engine
This is Rietveld 408576698