summaryrefslogtreecommitdiffstats
path: root/net/websockets
diff options
context:
space:
mode:
authorycxiao@chromium.org <ycxiao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-12 12:50:40 +0000
committerycxiao@chromium.org <ycxiao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-12 12:50:40 +0000
commit0966648d7862b5c8abf4a450eff797caada64938 (patch)
tree69a168151ddbd51921cc5ecb06d338bc544dbc28 /net/websockets
parent6f44ab0810d8b111781d6261cc69e99cd161b3c7 (diff)
downloadchromium_src-0966648d7862b5c8abf4a450eff797caada64938.zip
chromium_src-0966648d7862b5c8abf4a450eff797caada64938.tar.gz
chromium_src-0966648d7862b5c8abf4a450eff797caada64938.tar.bz2
Define an asynchronous API for CookieStore.
BUG=68657 TEST=xxxx Review URL: http://codereview.chromium.org/7155026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92150 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/websockets')
-rw-r--r--net/websockets/websocket_job_unittest.cc31
1 files changed, 30 insertions, 1 deletions
diff --git a/net/websockets/websocket_job_unittest.cc b/net/websockets/websocket_job_unittest.cc
index f36d771..434a5d7 100644
--- a/net/websockets/websocket_job_unittest.cc
+++ b/net/websockets/websocket_job_unittest.cc
@@ -145,6 +145,16 @@ class MockCookieStore : public net::CookieStore {
entries_.push_back(entry);
return true;
}
+
+ virtual void SetCookieWithOptionsAsync(
+ const GURL& url,
+ const std::string& cookie_line,
+ const net::CookieOptions& options,
+ const SetCookiesCallback& callback) {
+ bool result = SetCookieWithOptions(url, cookie_line, options);
+ if (!callback.is_null())
+ callback.Run(result);
+ }
virtual std::string GetCookiesWithOptions(
const GURL& url,
const net::CookieOptions& options) {
@@ -160,14 +170,34 @@ class MockCookieStore : public net::CookieStore {
}
return result;
}
+ virtual void GetCookiesWithOptionsAsync(
+ const GURL& url,
+ const net::CookieOptions& options,
+ const GetCookiesCallback& callback) {
+ if (!callback.is_null())
+ callback.Run(GetCookiesWithOptions(url, options));
+ }
virtual void GetCookiesWithInfo(const GURL& url,
const net::CookieOptions& options,
std::string* cookie_line,
std::vector<CookieInfo>* cookie_infos) {
NOTREACHED();
}
+ virtual void GetCookiesWithInfoAsync(
+ const GURL& url,
+ const net::CookieOptions& options,
+ const GetCookieInfoCallback& callback) {
+ NOTREACHED();
+ }
virtual void DeleteCookie(const GURL& url,
const std::string& cookie_name) {}
+
+ virtual void DeleteCookieAsync(const GURL& url,
+ const std::string& cookie_name,
+ const base::Closure& callback) {
+ NOTREACHED();
+}
+
virtual net::CookieMonster* GetCookieMonster() { return NULL; }
const std::vector<Entry>& entries() const { return entries_; }
@@ -259,7 +289,6 @@ class MockHttpTransactionFactory : public net::HttpTransactionFactory {
net::HostPortPair host_port_pair_;
net::HostPortProxyPair host_port_proxy_pair_;
};
-
}
namespace net {