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

Unified Diff: chrome/browser/google/google_update_win.cc

Issue 659333003: Record histograms for on-demand update check results. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/master
Patch Set: asvitkine comments Created 6 years, 2 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/google/google_update_win.cc
diff --git a/chrome/browser/google/google_update_win.cc b/chrome/browser/google/google_update_win.cc
index 0b217ad76bc3d4b39fde9ecf4b7b957815fd73a2..83b2a1081733c44c2eb48c95f372c0bc0fd4d77e 100644
--- a/chrome/browser/google/google_update_win.cc
+++ b/chrome/browser/google/google_update_win.cc
@@ -10,6 +10,8 @@
#include "base/bind.h"
#include "base/files/file_path.h"
#include "base/message_loop/message_loop.h"
+#include "base/metrics/histogram.h"
+#include "base/metrics/sparse_histogram.h"
#include "base/path_service.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
@@ -391,6 +393,12 @@ void GoogleUpdate::ReportResults(GoogleUpdateUpgradeResult results,
// If there is an error, then error code must not be blank, and vice versa.
DCHECK(results == UPGRADE_ERROR ? error_code != GOOGLE_UPDATE_NO_ERROR :
error_code == GOOGLE_UPDATE_NO_ERROR);
+ UMA_HISTOGRAM_ENUMERATION(
+ "UpdateCheckWin.UpgradeResult", results, NUM_UPGRADE_RESULTS);
+ if (results == UPGRADE_ERROR) {
+ UMA_HISTOGRAM_ENUMERATION(
+ "UpdateCheckWin.UpdateErrorCode", error_code, NUM_ERROR_CODES);
+ }
if (listener_) {
listener_->OnReportResults(
results, error_code, error_message, version_available_);
@@ -404,6 +412,7 @@ bool GoogleUpdate::ReportFailure(HRESULT hr,
DLOG(ERROR) << "Communication with Google Update failed: " << hr
<< " error: " << error_code
<< ", message: " << error_message.c_str();
+ UMA_HISTOGRAM_SPARSE_SLOWLY("UpdateCheckWin.ErrorHresult", hr);
main_loop->PostTask(
FROM_HERE,
base::Bind(&GoogleUpdate::ReportResults, this,

Powered by Google App Engine
This is Rietveld 408576698