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

Unified Diff: chrome/browser/automation/automation_util.h

Issue 6201005: Initial support for partitioning cookies for isolated apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix merge conflicts. 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
« no previous file with comments | « no previous file | chrome/browser/automation/automation_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/automation/automation_util.h
diff --git a/chrome/browser/automation/automation_util.h b/chrome/browser/automation/automation_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..bb383446a6f1e0af96a091720d2fbfbac203c286
--- /dev/null
+++ b/chrome/browser/automation/automation_util.h
@@ -0,0 +1,72 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_AUTOMATION_AUTOMATION_UTIL_H_
+#define CHROME_BROWSER_AUTOMATION_AUTOMATION_UTIL_H_
+#pragma once
+
+#include "base/basictypes.h"
+#include "chrome/browser/automation/automation_provider.h"
+#include "content/browser/tab_contents/tab_contents.h"
+
+class DictionaryValue;
+
+// This file contains automation utility functions.
+
+namespace automation_util {
+
+// Gets the size and value of the cookie string for |url| in the given tab.
+// Can be called from any thread.
+void GetCookies(const GURL& url,
+ TabContents* contents,
+ int* value_size,
+ std::string* value);
+
+// Sets a cookie for |url| in the given tab. Can be called from any thread.
+void SetCookie(const GURL& url,
+ const std::string value,
+ TabContents* contents,
+ int* response_value);
+
+// Deletes a cookie for |url| in the given tab. Can be called from any thread.
+void DeleteCookie(const GURL& url,
+ const std::string& cookie_name,
+ TabContents* contents,
+ bool* success);
+
+// Gets the cookies for the given URL. Uses the JSON interface.
+// Example:
+// input: { "windex": 1, "tab_index": 1, "url": "http://www.google.com" }
+// output: { "cookies": "PREF=12012" }
+void GetCookiesJSON(AutomationProvider* provider,
+ DictionaryValue* args,
+ IPC::Message* reply_message);
+
+// Deletes the cookie with the given name for the URL. Uses the JSON interface.
+// Example:
+// input: { "windex": 1,
+// "tab_index": 1,
+// "url": "http://www.google.com",
+// "name": "my_cookie"
+// }
+// output: none
+void DeleteCookieJSON(AutomationProvider* provider,
+ DictionaryValue* args,
+ IPC::Message* reply_message);
+
+// Sets a cookie for the given URL. Uses the JSON interface.
+// Example:
+// input: { "windex": 1,
+// "tab_index": 1,
+// "url": "http://www.google.com",
+// "cookie": "PREF=21321"
+// }
+// output: none
+void SetCookieJSON(AutomationProvider* provider,
+ DictionaryValue* args,
+ IPC::Message* reply_message);
+
+} // namespace automation_util
+
+#endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_UTIL_H_
« no previous file with comments | « no previous file | chrome/browser/automation/automation_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698