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

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

Issue 10702088: Refactor chrome.cookies API to use JSON schema compiler. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 6 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 adf0f5651911536ae8bf577a3360509b0fd52f97..f488dd8835efed88b8008d9001664169bf4a7e7e 100644
--- a/chrome/browser/extensions/api/cookies/cookies_api.h
+++ b/chrome/browser/extensions/api/cookies/cookies_api.h
@@ -76,24 +76,19 @@ class CookiesFunction : public AsyncExtensionFunction {
protected:
virtual ~CookiesFunction() {}
- // Looks for a 'url' value in the given details dictionary and constructs a
- // GURL from it. Returns false and assigns the internal error_ value if the
- // URL is invalid or isn't found in the dictionary. 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 base::DictionaryValue* details, GURL* url,
- bool check_host_permissions);
-
- // Checks the given details dictionary for a 'storeId' value, and retrieves
- // the cookie store context and the store ID associated with it. If the
- // 'storeId' value isn't found in the dictionary, the current execution
- // context's cookie store context is retrieved. Returns false on error and
- // assigns the internal error_ value if that occurs.
- // At least one of the output parameters store and store_id should be
- // non-NULL.
- bool ParseStoreContext(const base::DictionaryValue* details,
+ // 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(std::string url_string, GURL* url, bool check_host_permissions);
Aaron Boodman 2012/07/04 00:04:31 Input params that are non-primitive should almost
mitchellwrosen 2012/07/04 02:04:40 Done.
+
+ // If |store_id| is non-NULL, retrieves the specified store. Otherwise,
+ // retrieves the current execution context's store. Returns false on error
+ // and assigns the internal error_ value if that occurs. At least one of the
+ // output parameters context and out_store_id should be non-NULL.
+ bool ParseStoreContext(std::string* in_store_id,
Aaron Boodman 2012/07/04 00:04:31 Can you just have a single std::string* store_id a
mitchellwrosen 2012/07/04 02:04:40 Can you elaborate on this? How can you assign to s
Aaron Boodman 2012/07/04 06:35:40 Right you are. You could use empty string for the
net::URLRequestContextGetter** context,
- std::string* store_id);
+ std::string* out_store_id);
};
// Implements the cookies.get() extension function.

Powered by Google App Engine
This is Rietveld 408576698