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

Unified Diff: chrome/browser/automation/automation_cookie_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 in TestingAutomationProvider. 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_cookie_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/automation/automation_cookie_util.h
diff --git a/chrome/browser/automation/automation_cookie_util.h b/chrome/browser/automation/automation_cookie_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..803b5bdb3e71e35b4ff228c70bd3d43543d93ed2
--- /dev/null
+++ b/chrome/browser/automation/automation_cookie_util.h
@@ -0,0 +1,58 @@
+// 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_COOKIE_UTIL_H_
Paweł Hajdan Jr. 2011/03/08 07:49:01 Just automation_util please, I know another review
Charlie Reis 2011/03/08 20:44:41 Done.
+#define CHROME_BROWSER_AUTOMATION_AUTOMATION_COOKIE_UTIL_H_
+#pragma once
+
+#include "base/basictypes.h"
+#include "content/browser/tab_contents/tab_contents.h"
+#include "net/url_request/url_request_context.h"
+
+// This file contains utility functions for accessing cookies for a TabContents
+// on the correct thread.
+
+namespace automation_cookie_util {
+
+void GetCookiesOnIOThread(
Paweł Hajdan Jr. 2011/03/08 07:49:01 Those OnIOThread functions should be in anonymous
Charlie Reis 2011/03/08 20:44:41 Yes, it's better to hide them. There were a few n
+ const GURL& url,
+ const scoped_refptr<URLRequestContextGetter>& context_getter,
+ base::WaitableEvent* event,
+ std::string* cookies);
+
+void SetCookieOnIOThread(
+ const GURL& url,
+ const std::string& value,
+ const scoped_refptr<URLRequestContextGetter>& context_getter,
+ base::WaitableEvent* event,
+ bool* success);
+
+void DeleteCookieOnIOThread(
+ const GURL& url,
+ const std::string& name,
+ const scoped_refptr<URLRequestContextGetter>& context_getter,
+ base::WaitableEvent* event);
+
+// 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);
+
+} // namespace automation_cookie_util
+
+#endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_COOKIE_UTIL_H_
« no previous file with comments | « no previous file | chrome/browser/automation/automation_cookie_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698