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

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

Issue 177003015: Pull AsyncApiFunction out of src/chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase for storage_api 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/sockets_udp_api.cc
diff --git a/chrome/browser/extensions/api/sockets_udp/sockets_udp_api.cc b/chrome/browser/extensions/api/sockets_udp/sockets_udp_api.cc
index 2e6f2906908b038cbc8bf5f05f7a238465bd5af8..a710d0c23b92d80cf77e6f633fade1b95649e7de 100644
--- a/chrome/browser/extensions/api/sockets_udp/sockets_udp_api.cc
+++ b/chrome/browser/extensions/api/sockets_udp/sockets_udp_api.cc
@@ -6,7 +6,6 @@
#include "chrome/browser/extensions/api/socket/udp_socket.h"
#include "chrome/browser/extensions/api/sockets_udp/udp_socket_event_dispatcher.h"
-#include "chrome/browser/profiles/profile.h"
#include "chrome/common/extensions/api/sockets/sockets_manifest_data.h"
#include "content/public/common/socket_permission_request.h"
#include "net/base/net_errors.h"
@@ -141,7 +140,7 @@ bool SocketsUdpSetPausedFunction::Prepare() {
params_ = api::sockets_udp::SetPaused::Params::Create(*args_);
EXTENSION_FUNCTION_VALIDATE(params_.get());
- socket_event_dispatcher_ = UDPSocketEventDispatcher::Get(GetProfile());
+ socket_event_dispatcher_ = UDPSocketEventDispatcher::Get(browser_context());
DCHECK(socket_event_dispatcher_) << "There is no socket event dispatcher. "
"If this assertion is failing during a test, then it is likely that "
"TestExtensionSystem is failing to provide an instance of "
@@ -177,7 +176,7 @@ bool SocketsUdpBindFunction::Prepare() {
params_ = sockets_udp::Bind::Params::Create(*args_);
EXTENSION_FUNCTION_VALIDATE(params_.get());
- socket_event_dispatcher_ = UDPSocketEventDispatcher::Get(GetProfile());
+ socket_event_dispatcher_ = UDPSocketEventDispatcher::Get(browser_context());
DCHECK(socket_event_dispatcher_) << "There is no socket event dispatcher. "
"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