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

Unified Diff: components/captive_portal/captive_portal_detector.cc

Issue 2643013004: Add data usage tracking for chrome services (Closed)
Patch Set: rebased Created 3 years, 11 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
« no previous file with comments | « components/captive_portal/DEPS ('k') | components/data_use_measurement/core/data_use_user_data.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/captive_portal/captive_portal_detector.cc
diff --git a/components/captive_portal/captive_portal_detector.cc b/components/captive_portal/captive_portal_detector.cc
index 7188c340f9898688396d22eccc1b4754bbd03be1..04eb566438a1902948c124b9b5a4cdc7e9cb772b 100644
--- a/components/captive_portal/captive_portal_detector.cc
+++ b/components/captive_portal/captive_portal_detector.cc
@@ -6,6 +6,7 @@
#include "base/logging.h"
#include "base/strings/string_number_conversions.h"
+#include "components/data_use_measurement/core/data_use_user_data.h"
#include "net/base/load_flags.h"
#include "net/http/http_response_headers.h"
#include "net/http/http_util.h"
@@ -37,6 +38,9 @@ void CaptivePortalDetector::DetectCaptivePortal(
url_fetcher_ = net::URLFetcher::Create(0, url, net::URLFetcher::GET, this);
url_fetcher_->SetAutomaticallyRetryOn5xx(false);
url_fetcher_->SetRequestContext(request_context_.get());
+ data_use_measurement::DataUseUserData::AttachToFetcher(
+ url_fetcher_.get(),
+ data_use_measurement::DataUseUserData::CAPTIVE_PORTAL);
// Can't safely use net::LOAD_DISABLE_CERT_REVOCATION_CHECKING here,
// since then the connection may be reused without checking the cert.
« no previous file with comments | « components/captive_portal/DEPS ('k') | components/data_use_measurement/core/data_use_user_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698