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

Unified Diff: chrome/browser/extensions/app_notify_channel_setup.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/browser/extensions/app_notify_channel_setup.cc
diff --git a/chrome/browser/extensions/app_notify_channel_setup.cc b/chrome/browser/extensions/app_notify_channel_setup.cc
index e178cd5fc6682edbb009ed23a7af4ab1ed0b5c80..22bdb668c48f5eeb4b8f4a7a287eb8ba9fe1470e 100644
--- a/chrome/browser/extensions/app_notify_channel_setup.cc
+++ b/chrome/browser/extensions/app_notify_channel_setup.cc
@@ -23,6 +23,7 @@
#include "chrome/common/net/gaia/gaia_urls.h"
#include "chrome/common/pref_names.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/common/content_url_request_user_data.h"
#include "content/public/common/url_fetcher.h"
#include "net/base/escape.h"
#include "net/base/load_flags.h"
@@ -138,6 +139,9 @@ URLFetcher* AppNotifyChannelSetup::CreateURLFetcher(
body.empty() ? URLFetcher::GET : URLFetcher::POST;
URLFetcher* fetcher = URLFetcher::Create(0, url, type, this);
fetcher->SetRequestContext(profile_->GetRequestContext());
+ // No user data, as the request will be cookie-less.
+ fetcher->SetContentURLRequestUserData(
+ new content::ContentURLRequestUserData());
// Always set flags to neither send nor save cookies.
fetcher->SetLoadFlags(
net::LOAD_DO_NOT_SEND_COOKIES | net::LOAD_DO_NOT_SAVE_COOKIES);

Powered by Google App Engine
This is Rietveld 408576698