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

Unified Diff: chrome/common/net/gaia/gaia_oauth_client.cc

Issue 9572001: Do cookie checks in NetworkDelegate instead of the URLRequest::Delegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: clang fix Created 8 years, 10 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/common/net/gaia/gaia_oauth_client.cc
diff --git a/chrome/common/net/gaia/gaia_oauth_client.cc b/chrome/common/net/gaia/gaia_oauth_client.cc
index f5fac424d37e27d0cd738655fa388bd841cc5384..2adb4affb040cdea59c28be2b5661eaf2c2d87b8 100644
--- a/chrome/common/net/gaia/gaia_oauth_client.cc
+++ b/chrome/common/net/gaia/gaia_oauth_client.cc
@@ -8,6 +8,7 @@
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/values.h"
+#include "content/public/common/content_url_request_user_data.h"
#include "content/public/common/url_fetcher.h"
#include "content/public/common/url_fetcher_delegate.h"
#include "googleurl/src/gurl.h"
@@ -102,6 +103,9 @@ void GaiaOAuthClient::Core::MakeGaiaRequest(
request_.reset(content::URLFetcher::Create(
0, gaia_url_, content::URLFetcher::POST, this));
request_->SetRequestContext(request_context_getter_);
+ // TODO(jochen): Do cookie audit.
+ request_->SetContentURLRequestUserData(
+ new content::ContentURLRequestUserData());
request_->SetUploadData("application/x-www-form-urlencoded", post_body);
request_->SetMaxRetries(max_retries);
request_->Start();
@@ -122,6 +126,9 @@ void GaiaOAuthClient::Core::OnURLFetchComplete(
// We must set our request_context_getter_ again because
// URLFetcher::Core::RetryOrCompleteUrlFetch resets it to NULL...
request_->SetRequestContext(request_context_getter_);
+ // TODO(jochen): Do cookie audit.
+ request_->SetContentURLRequestUserData(
+ new content::ContentURLRequestUserData());
request_->Start();
} else {
request_.reset();

Powered by Google App Engine
This is Rietveld 408576698