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

Unified Diff: chrome/browser/extensions/api/cookies/cookies_api.h

Issue 252653002: Rename (Chrome)SyncExtensionFunction::RunImpl to RunSync so that the RunImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix bookmarks Created 6 years, 8 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/cookies/cookies_api.h
diff --git a/chrome/browser/extensions/api/cookies/cookies_api.h b/chrome/browser/extensions/api/cookies/cookies_api.h
index 0a1ed11b3349769e80204cdd74d3d411c56f1450..1389ffcda6f749ec95f47f7c40fbb4241ece25d8 100644
--- a/chrome/browser/extensions/api/cookies/cookies_api.h
+++ b/chrome/browser/extensions/api/cookies/cookies_api.h
@@ -60,34 +60,8 @@ class CookiesEventRouter : public content::NotificationObserver {
DISALLOW_COPY_AND_ASSIGN(CookiesEventRouter);
};
-// Serves as a base class for all cookies API functions, and defines some
-// common functionality for parsing cookies API function arguments.
-// Note that all of the functions in this file derive from
-// AsyncExtensionFunction, and are not threadsafe, so they should not be
-// concurrently accessed from multiple threads. They modify |result_| and other
-// member variables directly.
-// See extensions/browser/extension_function.h for more information.
-class CookiesFunction : public ChromeAsyncExtensionFunction {
- protected:
- virtual ~CookiesFunction() {}
-
- // Constructs a GURL from the given url string. Returns false and assigns the
- // internal error_ value if the URL is invalid. If |check_host_permissions| is
- // true, the URL is also checked against the extension's host permissions, and
- // if there is no permission for the URL, this function returns false.
- bool ParseUrl(const std::string& url_string, GURL* url,
- bool check_host_permissions);
-
- // Gets the store identified by |store_id| and returns it in |context|.
- // If |store_id| contains an empty string, retrieves the current execution
- // context's store. In this case, |store_id| is populated with the found
- // store, and |context| can be NULL if the caller only wants |store_id|.
- bool ParseStoreContext(std::string* store_id,
- net::URLRequestContextGetter** context);
-};
-
// Implements the cookies.get() extension function.
-class CookiesGetFunction : public CookiesFunction {
+class CookiesGetFunction : public ChromeAsyncExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("cookies.get", COOKIES_GET)
@@ -110,7 +84,7 @@ class CookiesGetFunction : public CookiesFunction {
};
// Implements the cookies.getAll() extension function.
-class CookiesGetAllFunction : public CookiesFunction {
+class CookiesGetAllFunction : public ChromeAsyncExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("cookies.getAll", COOKIES_GETALL)
@@ -133,7 +107,7 @@ class CookiesGetAllFunction : public CookiesFunction {
};
// Implements the cookies.set() extension function.
-class CookiesSetFunction : public CookiesFunction {
+class CookiesSetFunction : public ChromeAsyncExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("cookies.set", COOKIES_SET)
@@ -156,7 +130,7 @@ class CookiesSetFunction : public CookiesFunction {
};
// Implements the cookies.remove() extension function.
-class CookiesRemoveFunction : public CookiesFunction {
+class CookiesRemoveFunction : public ChromeAsyncExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("cookies.remove", COOKIES_REMOVE)
@@ -179,7 +153,7 @@ class CookiesRemoveFunction : public CookiesFunction {
};
// Implements the cookies.getAllCookieStores() extension function.
-class CookiesGetAllCookieStoresFunction : public CookiesFunction {
+class CookiesGetAllCookieStoresFunction : public ChromeSyncExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("cookies.getAllCookieStores",
COOKIES_GETALLCOOKIESTORES)
@@ -188,9 +162,7 @@ class CookiesGetAllCookieStoresFunction : public CookiesFunction {
virtual ~CookiesGetAllCookieStoresFunction() {}
// ExtensionFunction:
- // CookiesGetAllCookieStoresFunction is sync.
- virtual void Run() OVERRIDE;
- virtual bool RunImpl() OVERRIDE;
+ virtual bool RunSync() OVERRIDE;
};
class CookiesAPI : public BrowserContextKeyedAPI,
« no previous file with comments | « chrome/browser/extensions/api/context_menus/context_menus_api.cc ('k') | chrome/browser/extensions/api/cookies/cookies_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698