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

Unified Diff: chrome/browser/extensions/api/socket/socket_api.h

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/socket/socket_api.h
diff --git a/chrome/browser/extensions/api/socket/socket_api.h b/chrome/browser/extensions/api/socket/socket_api.h
index c52bf6dd5ce64ca386efad81e0396d4e05ac32cc..dc2856e70a95707002a98fdbc20f5fecb60cc66f 100644
--- a/chrome/browser/extensions/api/socket/socket_api.h
+++ b/chrome/browser/extensions/api/socket/socket_api.h
@@ -7,9 +7,9 @@
#include "base/gtest_prod_util.h"
#include "base/memory/ref_counted.h"
-#include "chrome/browser/extensions/api/api_function.h"
#include "chrome/browser/extensions/api/api_resource_manager.h"
#include "chrome/common/extensions/api/socket.h"
+#include "extensions/browser/api/async_api_function.h"
#include "extensions/browser/extension_function.h"
#include "net/base/address_list.h"
#include "net/dns/host_resolver.h"
@@ -19,6 +19,10 @@
class IOThread;
+namespace content {
+class BrowserContext;
+}
+
namespace net {
class IOBuffer;
}
@@ -35,7 +39,7 @@ class SocketResourceManagerInterface {
public:
virtual ~SocketResourceManagerInterface() {}
- virtual bool SetProfile(Profile* profile) = 0;
+ virtual bool SetBrowserContext(content::BrowserContext* context) = 0;
virtual int Add(Socket *socket) = 0;
virtual Socket* Get(const std::string& extension_id,
int api_resource_id) = 0;
@@ -54,8 +58,8 @@ class SocketResourceManager : public SocketResourceManagerInterface {
: manager_(NULL) {
}
- virtual bool SetProfile(Profile* profile) OVERRIDE {
- manager_ = ApiResourceManager<T>::Get(profile);
+ virtual bool SetBrowserContext(content::BrowserContext* context) OVERRIDE {
+ manager_ = ApiResourceManager<T>::Get(context);
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 "
« no previous file with comments | « chrome/browser/extensions/api/serial/serial_api.cc ('k') | chrome/browser/extensions/api/socket/socket_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698