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

Unified Diff: chrome/service/cloud_print/job_status_updater.cc

Issue 58513004: Added CloudPrint.NativeJobStatus histogram. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 | « no previous file | chrome/service/cloud_print/print_system.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/service/cloud_print/job_status_updater.cc
diff --git a/chrome/service/cloud_print/job_status_updater.cc b/chrome/service/cloud_print/job_status_updater.cc
index c89f0acdfb593bc835b53851b7ed961a71eb8a63..3334bcfb6dc0942edd4be9287cb1ff7462a78823 100644
--- a/chrome/service/cloud_print/job_status_updater.cc
+++ b/chrome/service/cloud_print/job_status_updater.cc
@@ -6,6 +6,7 @@
#include "base/bind.h"
#include "base/json/json_reader.h"
+#include "base/metrics/histogram.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
@@ -47,7 +48,7 @@ void JobStatusUpdater::UpdateStatus() {
} else {
PrintJobDetails details;
if (print_system_->GetJobDetails(printer_name_, local_job_id_,
- &details)) {
+ &details)) {
if (details != last_job_details_) {
last_job_details_ = details;
need_update = true;
@@ -60,6 +61,8 @@ void JobStatusUpdater::UpdateStatus() {
last_job_details_.status = PRINT_JOB_STATUS_COMPLETED;
need_update = true;
}
+ UMA_HISTOGRAM_ENUMERATION("CloudPrint.NativeJobStatus",
+ last_job_details_.status, PRINT_JOB_STATUS_MAX);
}
if (need_update) {
request_ = CloudPrintURLFetcher::Create();
« no previous file with comments | « no previous file | chrome/service/cloud_print/print_system.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698