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

Unified Diff: chrome/browser/shell_integration.cc

Issue 1776213002: Removed DefaultBrowser.SetDefaultAsyncDuration histogram (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 | « chrome/browser/shell_integration.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/shell_integration.cc
diff --git a/chrome/browser/shell_integration.cc b/chrome/browser/shell_integration.cc
index c38ffb46ba9c45900f4b03d85525ac9dbb6d43e8..a714630fa7f92f561c68cf4f85f1652ea2bcf129 100644
--- a/chrome/browser/shell_integration.cc
+++ b/chrome/browser/shell_integration.cc
@@ -174,9 +174,6 @@ void DefaultWebClientWorker::StartSetAsDefault() {
set_as_default_in_progress_ = true;
set_as_default_initialized_ = InitializeSetAsDefault();
- // Remember the start time.
- start_time_ = base::TimeTicks::Now();
-
BrowserThread::PostTask(
BrowserThread::FILE, FROM_HERE,
base::Bind(&DefaultWebClientWorker::SetAsDefault, this));
@@ -231,25 +228,12 @@ void DefaultWebClientWorker::OnSetAsDefaultAttemptComplete(
}
void DefaultWebClientWorker::ReportAttemptResult(AttemptResult result) {
- const char* histogram_prefix = GetHistogramPrefix();
-
- // Report result.
base::LinearHistogram::FactoryGet(
- base::StringPrintf("%s.SetDefaultResult", histogram_prefix), 1,
+ base::StringPrintf("%s.SetDefaultResult", GetHistogramPrefix()), 1,
AttemptResult::NUM_ATTEMPT_RESULT_TYPES,
AttemptResult::NUM_ATTEMPT_RESULT_TYPES + 1,
base::HistogramBase::kUmaTargetedHistogramFlag)
->Add(result);
-
- // Report asynchronous duration.
- if (IsSetAsDefaultAsynchronous() && ShouldReportDurationForResult(result)) {
- base::Histogram::FactoryTimeGet(
- base::StringPrintf("%s.SetDefaultAsyncDuration_%s", histogram_prefix,
- AttemptResultToString(result)),
- base::TimeDelta::FromMilliseconds(10), base::TimeDelta::FromMinutes(3),
- 50, base::HistogramBase::kUmaTargetedHistogramFlag)
- ->AddTime(base::TimeTicks::Now() - start_time_);
- }
}
bool DefaultWebClientWorker::InitializeSetAsDefault() {
@@ -277,35 +261,6 @@ void DefaultWebClientWorker::UpdateUI(DefaultWebClientState state) {
}
}
-bool DefaultWebClientWorker::ShouldReportDurationForResult(
- AttemptResult result) {
- return result == SUCCESS || result == FAILURE || result == RETRY;
-}
-
-const char* DefaultWebClientWorker::AttemptResultToString(
- AttemptResult result) {
- switch (result) {
- case SUCCESS:
- return "Success";
- case ALREADY_DEFAULT:
- return "AlreadyDefault";
- case FAILURE:
- return "Failure";
- case LAUNCH_FAILURE:
- return "LaunchFailure";
- case OTHER_WORKER:
- return "OtherWorker";
- case RETRY:
- return "Retry";
- case NO_ERRORS_NOT_DEFAULT:
- return "NoErrorsNotDefault";
- case NUM_ATTEMPT_RESULT_TYPES:
- break;
- }
- NOTREACHED();
- return "";
-}
-
///////////////////////////////////////////////////////////////////////////////
// DefaultBrowserWorker
//
« no previous file with comments | « chrome/browser/shell_integration.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698