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

Unified Diff: chrome/browser/metrics/metrics_service.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/metrics/metrics_service.cc
diff --git a/chrome/browser/metrics/metrics_service.cc b/chrome/browser/metrics/metrics_service.cc
index fdf9bfde23ae8bdcd2bb68bec1eb393c0c561e19..2196d64ad3928e67c8f19e4a340bd0ee0f8d7cc0 100644
--- a/chrome/browser/metrics/metrics_service.cc
+++ b/chrome/browser/metrics/metrics_service.cc
@@ -181,6 +181,7 @@
#include "content/public/browser/notification_service.h"
#include "content/public/browser/plugin_service.h"
#include "content/public/browser/render_process_host.h"
+#include "content/public/common/content_url_request_user_data.h"
#include "content/public/common/url_fetcher.h"
#include "net/base/load_flags.h"
#include "webkit/plugins/webplugininfo.h"
@@ -1091,6 +1092,9 @@ void MetricsService::PrepareFetchWithStagedLog() {
g_browser_process->system_request_context());
current_fetch_xml_->SetUploadData(kMetricsTypeXml,
log_manager_.staged_log_text().xml);
+ // No user data, as the request will be cookie-less.
+ current_fetch_xml_->SetContentURLRequestUserData(
+ new content::ContentURLRequestUserData());
// We already drop cookies server-side, but we might as well strip them out
// client-side as well.
current_fetch_xml_->SetLoadFlags(net::LOAD_DO_NOT_SAVE_COOKIES |
@@ -1105,6 +1109,9 @@ void MetricsService::PrepareFetchWithStagedLog() {
g_browser_process->system_request_context());
current_fetch_proto_->SetUploadData(kMetricsTypeProto,
log_manager_.staged_log_text().proto);
+ // No user data, as the request will be cookie-less.
+ current_fetch_proto_->SetContentURLRequestUserData(
+ new content::ContentURLRequestUserData());
// We already drop cookies server-side, but we might as well strip them out
// client-side as well.
current_fetch_proto_->SetLoadFlags(net::LOAD_DO_NOT_SAVE_COOKIES |

Powered by Google App Engine
This is Rietveld 408576698