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

Unified Diff: chrome/browser/extensions/api/sockets_tcp/tcp_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_tcp/tcp_socket_event_dispatcher.cc
diff --git a/chrome/browser/extensions/api/sockets_tcp/tcp_socket_event_dispatcher.cc b/chrome/browser/extensions/api/sockets_tcp/tcp_socket_event_dispatcher.cc
index b0cf650c068884203451c0e903f525f3ac5f83c0..07a6c19fcf21cbe8db33450f6487ba8c5e1c9a40 100644
--- a/chrome/browser/extensions/api/sockets_tcp/tcp_socket_event_dispatcher.cc
+++ b/chrome/browser/extensions/api/sockets_tcp/tcp_socket_event_dispatcher.cc
@@ -31,18 +31,20 @@ ProfileKeyedAPIFactory<TCPSocketEventDispatcher>*
}
// static
-TCPSocketEventDispatcher* TCPSocketEventDispatcher::Get(Profile* profile) {
+TCPSocketEventDispatcher* TCPSocketEventDispatcher::Get(
+ content::BrowserContext* context) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
return ProfileKeyedAPIFactory<TCPSocketEventDispatcher>::GetForProfile(
- profile);
+ context);
}
-TCPSocketEventDispatcher::TCPSocketEventDispatcher(Profile* profile)
+TCPSocketEventDispatcher::TCPSocketEventDispatcher(
+ content::BrowserContext* context)
: thread_id_(Socket::kThreadId),
- profile_(profile) {
+ profile_(Profile::FromBrowserContext(context)) {
ApiResourceManager<ResumableTCPSocket>* manager =
- ApiResourceManager<ResumableTCPSocket>::Get(profile);
+ ApiResourceManager<ResumableTCPSocket>::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