| Index: webkit/tools/test_shell/simple_resource_loader_bridge.cc
|
| ===================================================================
|
| --- webkit/tools/test_shell/simple_resource_loader_bridge.cc (revision 100888)
|
| +++ webkit/tools/test_shell/simple_resource_loader_bridge.cc (working copy)
|
| @@ -32,6 +32,7 @@
|
|
|
| #include "webkit/tools/test_shell/simple_resource_loader_bridge.h"
|
|
|
| +#include "base/bind.h"
|
| #include "base/compiler_specific.h"
|
| #include "base/file_path.h"
|
| #include "base/file_util.h"
|
| @@ -745,7 +746,9 @@
|
| public:
|
| void Set(const GURL& url, const std::string& cookie) {
|
| DCHECK(MessageLoop::current() == g_io_thread->message_loop());
|
| - g_request_context->cookie_store()->SetCookie(url, cookie);
|
| + g_request_context->cookie_store()->SetCookieWithOptionsAsync(
|
| + url, cookie, net::CookieOptions(),
|
| + net::CookieStore::SetCookiesCallback());
|
| }
|
|
|
| private:
|
| @@ -760,8 +763,9 @@
|
| }
|
|
|
| void Get(const GURL& url) {
|
| - result_ = g_request_context->cookie_store()->GetCookies(url);
|
| - event_.Signal();
|
| + g_request_context->cookie_store()->GetCookiesWithOptionsAsync(
|
| + url, net::CookieOptions(),
|
| + base::Bind(&CookieGetter::OnGetCookies, this));
|
| }
|
|
|
| std::string GetResult() {
|
| @@ -771,6 +775,10 @@
|
| }
|
|
|
| private:
|
| + void OnGetCookies(const std::string& cookie_line) {
|
| + result_ = cookie_line;
|
| + event_.Signal();
|
| + }
|
| friend class base::RefCountedThreadSafe<CookieGetter>;
|
|
|
| ~CookieGetter() {}
|
|
|