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 /chrome/browser/net/cookie_policy_browsertest.cc | |
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 'chrome/browser/net/cookie_policy_browsertest.cc')
-rw-r--r-- | chrome/browser/net/cookie_policy_browsertest.cc | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/chrome/browser/net/cookie_policy_browsertest.cc b/chrome/browser/net/cookie_policy_browsertest.cc index b242c5c..251ae69 100644 --- a/chrome/browser/net/cookie_policy_browsertest.cc +++ b/chrome/browser/net/cookie_policy_browsertest.cc @@ -2,7 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "base/bind.h" #include "base/task.h" #include "base/synchronization/waitable_event.h" #include "chrome/browser/content_settings/host_content_settings_map.h" @@ -30,19 +29,10 @@ class GetCookiesTask : public Task { cookies_(cookies) {} virtual void Run() { - net::CookieOptions options; - context_getter_->GetURLRequestContext()->cookie_store() - ->GetCookiesWithOptionsAsync( - url_, options, base::Bind(&GetCookiesTask::GetCookiesCallback, - base::Unretained(cookies_), - base::Unretained(event_))); - } - - static void GetCookiesCallback(std::string* cookies_out, - base::WaitableEvent* event, - const std::string& cookies) { - *cookies_out = cookies; - event->Signal(); + *cookies_ = + context_getter_->GetURLRequestContext()->cookie_store()-> + GetCookies(url_); + event_->Signal(); } private: |