diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-09 02:33:15 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-09 02:33:15 +0000 |
commit | 4aa89e8ece48729ea064568b673ff43d19a1b40d (patch) | |
tree | f959786d66def8e80548b1393ea502291b25376b /webkit/tools | |
parent | 8ce1f6165f0ffc1564b25dc9fef90d05816ae634 (diff) | |
download | chromium_src-4aa89e8ece48729ea064568b673ff43d19a1b40d.zip chromium_src-4aa89e8ece48729ea064568b673ff43d19a1b40d.tar.gz chromium_src-4aa89e8ece48729ea064568b673ff43d19a1b40d.tar.bz2 |
Revert 100188 - Finalize a CL originally by departed intern ycxiao@ that detaches the loading of cookies from the IO thread.
They are now loaded on the DB thread. Cookie operations received in the meantime are queued and executed, on the IO thread, in the order they were received, when loading completes.
A few straggler clients are updated to use the asynchronous CookieStore/CookieMonster API as part of this CL, as the synchronous API is removed.
BUG=68657
TEST=net_unittests / DeferredCookieTaskTest.* and CookieMonsterTest.*
Review URL: http://codereview.chromium.org/7833042
TBR=erikwright@chromium.org
Review URL: http://codereview.chromium.org/7860026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100335 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools')
-rw-r--r-- | webkit/tools/test_shell/simple_resource_loader_bridge.cc | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/webkit/tools/test_shell/simple_resource_loader_bridge.cc b/webkit/tools/test_shell/simple_resource_loader_bridge.cc index a6d2d84..73f9160 100644 --- a/webkit/tools/test_shell/simple_resource_loader_bridge.cc +++ b/webkit/tools/test_shell/simple_resource_loader_bridge.cc @@ -32,7 +32,6 @@ #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" @@ -746,13 +745,10 @@ class CookieSetter : public base::RefCountedThreadSafe<CookieSetter> { public: void Set(const GURL& url, const std::string& cookie) { DCHECK(MessageLoop::current() == g_io_thread->message_loop()); - g_request_context->cookie_store()->SetCookieWithOptionsAsync( - url, cookie, net::CookieOptions(), - net::CookieStore::SetCookiesCallback()); + g_request_context->cookie_store()->SetCookie(url, cookie); } private: - friend class base::RefCountedThreadSafe<CookieSetter>; ~CookieSetter() {} @@ -764,9 +760,8 @@ class CookieGetter : public base::RefCountedThreadSafe<CookieGetter> { } void Get(const GURL& url) { - g_request_context->cookie_store()->GetCookiesWithOptionsAsync( - url, net::CookieOptions(), - base::Bind(&CookieGetter::OnGetCookies, this)); + result_ = g_request_context->cookie_store()->GetCookies(url); + event_.Signal(); } std::string GetResult() { @@ -776,10 +771,6 @@ class CookieGetter : public base::RefCountedThreadSafe<CookieGetter> { } private: - void OnGetCookies(const std::string& cookie_line) { - result_ = cookie_line; - event_.Signal(); - } friend class base::RefCountedThreadSafe<CookieGetter>; ~CookieGetter() {} |