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

Unified Diff: chrome/browser/extensions/extension_updater.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/extension_updater.cc
diff --git a/chrome/browser/extensions/extension_updater.cc b/chrome/browser/extensions/extension_updater.cc
index 04f5c293ec6bc4f073a4a08fd55bda94bdec6610..c5d92223e04a7c4c7c096d4106bbbb4324f2d8ab 100644
--- a/chrome/browser/extensions/extension_updater.cc
+++ b/chrome/browser/extensions/extension_updater.cc
@@ -40,6 +40,7 @@
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/utility_process_host.h"
+#include "content/public/common/content_url_request_user_data.h"
#include "content/public/common/url_fetcher.h"
#include "crypto/sha2.h"
#include "googleurl/src/gurl.h"
@@ -1226,6 +1227,9 @@ void ExtensionUpdater::StartUpdateCheck(ManifestFetchData* fetch_data) {
kManifestFetcherId, fetch_data->full_url(), content::URLFetcher::GET,
this));
manifest_fetcher_->SetRequestContext(profile_->GetRequestContext());
+ // No user data, as the request will be cookie-less.
+ manifest_fetcher_->SetContentURLRequestUserData(
+ new content::ContentURLRequestUserData());
manifest_fetcher_->SetLoadFlags(net::LOAD_DO_NOT_SEND_COOKIES |
net::LOAD_DO_NOT_SAVE_COOKIES |
net::LOAD_DISABLE_CACHE);
@@ -1254,6 +1258,9 @@ void ExtensionUpdater::FetchUpdatedExtension(const std::string& id,
kExtensionFetcherId, url, content::URLFetcher::GET, this));
extension_fetcher_->SetRequestContext(
profile_->GetRequestContext());
+ // No user data, as the request will be cookie-less.
+ extension_fetcher_->SetContentURLRequestUserData(
+ new content::ContentURLRequestUserData());
extension_fetcher_->SetLoadFlags(net::LOAD_DO_NOT_SEND_COOKIES |
net::LOAD_DO_NOT_SAVE_COOKIES |
net::LOAD_DISABLE_CACHE);

Powered by Google App Engine
This is Rietveld 408576698