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

Unified Diff: update_attempter.h

Issue 2868061: Measure and send update time to UMA. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git
Patch Set: Created 10 years, 5 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 | « main.cc ('k') | update_attempter.cc » ('j') | update_attempter.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: update_attempter.h
diff --git a/update_attempter.h b/update_attempter.h
index 711c8ea0339eaa535d4caae51911ad3854547fde..5eda43f119c963f821d74b1f4a17cb39c3de9b79 100644
--- a/update_attempter.h
+++ b/update_attempter.h
@@ -15,6 +15,7 @@
#include "update_engine/omaha_request_params.h"
#include "update_engine/omaha_response_handler_action.h"
+class MetricsLibraryInterface;
struct UpdateEngineService;
namespace chromeos_update_engine {
@@ -36,12 +37,14 @@ const char* UpdateStatusToString(UpdateStatus status);
class UpdateAttempter : public ActionProcessorDelegate,
public DownloadActionDelegate {
public:
- UpdateAttempter() : dbus_service_(NULL),
- status_(UPDATE_STATUS_IDLE),
- download_progress_(0.0),
- last_checked_time_(0),
- new_version_("0.0.0.0"),
- new_size_(0) {
+ UpdateAttempter(MetricsLibraryInterface* metrics_lib)
+ : dbus_service_(NULL),
+ metrics_lib_(metrics_lib),
+ status_(UPDATE_STATUS_IDLE),
+ download_progress_(0.0),
+ last_checked_time_(0),
+ new_version_("0.0.0.0"),
+ new_size_(0) {
last_notify_time_.tv_sec = 0;
last_notify_time_.tv_nsec = 0;
if (utils::FileExists(kUpdateCompletedMarker))
@@ -96,6 +99,9 @@ class UpdateAttempter : public ActionProcessorDelegate,
// pointer to the OmahaResponseHandlerAction in the actions_ vector;
std::tr1::shared_ptr<OmahaResponseHandlerAction> response_handler_action_;
+ // Pointer to the UMA metrics collection library.
+ MetricsLibraryInterface* metrics_lib_;
+
// For status:
UpdateStatus status_;
double download_progress_;
« no previous file with comments | « main.cc ('k') | update_attempter.cc » ('j') | update_attempter.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698