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

Unified Diff: components/password_manager/core/browser/affiliation_backend.cc

Issue 1065773006: Revert "Add experiment to exercise AffiliationService with dummy data, plus add related UMA histogr… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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: components/password_manager/core/browser/affiliation_backend.cc
diff --git a/components/password_manager/core/browser/affiliation_backend.cc b/components/password_manager/core/browser/affiliation_backend.cc
index 48301dbf24bca77b18b2b5a67b2d51509f16cfa3..fe7e31d8bfabf869508c8668dd0324927bc83a63 100644
--- a/components/password_manager/core/browser/affiliation_backend.cc
+++ b/components/password_manager/core/browser/affiliation_backend.cc
@@ -8,7 +8,6 @@
#include "base/bind.h"
#include "base/location.h"
-#include "base/metrics/histogram_macros.h"
#include "base/single_thread_task_runner.h"
#include "base/threading/thread_checker.h"
#include "base/time/clock.h"
@@ -31,7 +30,6 @@ AffiliationBackend::AffiliationBackend(
task_runner_(task_runner),
clock_(time_source.Pass()),
tick_clock_(time_tick_source.Pass()),
- construction_time_(clock_->Now()),
weak_ptr_factory_(this) {
DCHECK_LT(base::Time(), clock_->Now());
}
@@ -227,28 +225,9 @@ bool AffiliationBackend::OnCanSendNetworkRequest() {
fetcher_.reset(AffiliationFetcher::Create(request_context_getter_.get(),
requested_facet_uris, this));
fetcher_->StartRequest();
- ReportStatistics(requested_facet_uris.size());
return true;
}
-void AffiliationBackend::ReportStatistics(size_t requested_facet_uri_count) {
- UMA_HISTOGRAM_COUNTS_100("PasswordManager.AffiliationBackend.FetchSize",
- requested_facet_uri_count);
-
- if (last_request_time_.is_null()) {
- base::TimeDelta delay = clock_->Now() - construction_time_;
- UMA_HISTOGRAM_CUSTOM_TIMES(
- "PasswordManager.AffiliationBackend.FirstFetchDelay", delay,
- base::TimeDelta::FromSeconds(1), base::TimeDelta::FromDays(3), 50);
- } else {
- base::TimeDelta delay = clock_->Now() - last_request_time_;
- UMA_HISTOGRAM_CUSTOM_TIMES(
- "PasswordManager.AffiliationBackend.SubsequentFetchDelay", delay,
- base::TimeDelta::FromSeconds(1), base::TimeDelta::FromDays(3), 50);
- }
- last_request_time_ = clock_->Now();
-}
-
void AffiliationBackend::SetThrottlerForTesting(
scoped_ptr<AffiliationFetchThrottler> throttler) {
throttler_ = throttler.Pass();

Powered by Google App Engine
This is Rietveld 408576698