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

Unified Diff: chrome/browser/net/cookie_policy_browsertest.cc

Issue 7598001: Remove the old synchronous CookieMonster API. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years, 4 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
Index: chrome/browser/net/cookie_policy_browsertest.cc
===================================================================
--- chrome/browser/net/cookie_policy_browsertest.cc (revision 96178)
+++ chrome/browser/net/cookie_policy_browsertest.cc (working copy)
@@ -2,6 +2,7 @@
// 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"
@@ -29,9 +30,15 @@
cookies_(cookies) {}
virtual void Run() {
- *cookies_ =
- context_getter_->GetURLRequestContext()->cookie_store()->
- GetCookies(url_);
+ net::CookieOptions options;
+ context_getter_->GetURLRequestContext()->cookie_store()
+ ->GetCookiesWithOptionsAsync(
+ url_, options, base::Bind(&GetCookiesTask::GetCookiesCallback,
+ base::Unretained(this)));
+ }
+
+ void GetCookiesCallback(const std::string& cookies) {
+ *cookies_ = cookies;
event_->Signal();
}

Powered by Google App Engine
This is Rietveld 408576698