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

Unified Diff: chrome/test/automation/automation_json_requests.h

Issue 6705004: Return the full cookie details in TestingAutomationProvider and pass around (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 9 years, 9 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/test/automation/automation_json_requests.h
diff --git a/chrome/test/automation/automation_json_requests.h b/chrome/test/automation/automation_json_requests.h
index 99f9c08d38fc3cad99eb2e0e3b47233a07c6ec3d..f1a2025d2aee7e5fb096b2ef2eeb1add7565e41a 100644
--- a/chrome/test/automation/automation_json_requests.h
+++ b/chrome/test/automation/automation_json_requests.h
@@ -15,6 +15,8 @@
class AutomationMessageSender;
class GURL;
+class DictionaryValue;
+class ListValue;
class Value;
struct WebKeyEvent {
@@ -112,9 +114,19 @@ bool SendGetTabTitleJSONRequest(
int tab_index,
std::string* tab_title) WARN_UNUSED_RESULT;
-// Requests all the cookies for the given URL. Returns true on success.
+// Requests all the cookies for the given URL. On success returns true and
+// caller takes ownership of |cookies|, which is a list of all the cookies in
+// dictionary format.
bool SendGetCookiesJSONRequest(
AutomationMessageSender* sender,
+ const std::string& url,
+ ListValue** cookies) WARN_UNUSED_RESULT;
+
+// Requests all the cookies for the given URL. Returns true on success.
+// Use |SendGetCookiesJSONRequest| for chrome versions greater than 11.
+// TODO(kkania): Remove this function when version 12 is stable.
+bool SendGetCookiesJSONRequestDeprecated(
+ AutomationMessageSender* sender,
int browser_index,
const std::string& url,
std::string* cookies) WARN_UNUSED_RESULT;
@@ -123,14 +135,32 @@ bool SendGetCookiesJSONRequest(
// on success.
bool SendDeleteCookieJSONRequest(
AutomationMessageSender* sender,
+ const std::string& url,
+ const std::string& cookie_name) WARN_UNUSED_RESULT;
+
+// Requests deletion of the cookie with the given name and URL. Returns true
+// on success. Use |SendDeleteCookieJSONRequest| for chrome versions greater
+// than 11.
+// TODO(kkania): Remove this function when version 12 is stable.
+bool SendDeleteCookieJSONRequestDeprecated(
+ AutomationMessageSender* sender,
int browser_index,
const std::string& url,
const std::string& cookie_name) WARN_UNUSED_RESULT;
// Requests setting the given cookie for the given URL. Returns true on
-// success.
+// success. The caller retains ownership of |cookie_dict|.
bool SendSetCookieJSONRequest(
AutomationMessageSender* sender,
+ const std::string& url,
+ DictionaryValue* cookie_dict) WARN_UNUSED_RESULT;
+
+// Requests setting the given cookie for the given URL. Returns true on
+// success. Use |SendSetCookieJSONRequest| instead for chrome versions greater
+// than 11.
+// TODO(kkania): Remove this when version 12 is stable.
+bool SendSetCookieJSONRequestDeprecated(
+ AutomationMessageSender* sender,
int browser_index,
const std::string& url,
const std::string& cookie) WARN_UNUSED_RESULT;
« no previous file with comments | « chrome/browser/automation/testing_automation_provider.h ('k') | chrome/test/automation/automation_json_requests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698