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

Unified Diff: chrome/browser/profiles/profile_downloader.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/profiles/profile_downloader.cc
diff --git a/chrome/browser/profiles/profile_downloader.cc b/chrome/browser/profiles/profile_downloader.cc
index d4726f21839ea5d73d36dbcf92cb8a354ff0c079..1837c1b6033c2bd1babfa31c940ea0de2477b947 100644
--- a/chrome/browser/profiles/profile_downloader.cc
+++ b/chrome/browser/profiles/profile_downloader.cc
@@ -26,6 +26,7 @@
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
+#include "content/public/common/content_url_request_user_data.h"
#include "content/public/common/url_fetcher.h"
#include "googleurl/src/gurl.h"
#include "net/base/load_flags.h"
@@ -245,6 +246,9 @@ void ProfileDownloader::StartFetchingImage() {
GURL(kUserEntryURL), content::URLFetcher::GET, this));
user_entry_fetcher_->SetRequestContext(
delegate_->GetBrowserProfile()->GetRequestContext());
+ // TODO(jochen): Do cookie audit.
+ user_entry_fetcher_->SetContentURLRequestUserData(
+ new content::ContentURLRequestUserData());
user_entry_fetcher_->SetLoadFlags(net::LOAD_DO_NOT_SAVE_COOKIES);
if (!auth_token_.empty()) {
user_entry_fetcher_->SetExtraRequestHeaders(
@@ -307,6 +311,9 @@ void ProfileDownloader::OnURLFetchComplete(const content::URLFetcher* source) {
GURL(image_url), content::URLFetcher::GET, this));
profile_image_fetcher_->SetRequestContext(
delegate_->GetBrowserProfile()->GetRequestContext());
+ // TODO(jochen): Do cookie audit.
+ profile_image_fetcher_->SetContentURLRequestUserData(
+ new content::ContentURLRequestUserData());
profile_image_fetcher_->SetLoadFlags(net::LOAD_DO_NOT_SAVE_COOKIES);
if (!auth_token_.empty()) {
profile_image_fetcher_->SetExtraRequestHeaders(

Powered by Google App Engine
This is Rietveld 408576698