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

Unified Diff: chrome/browser/metrics/chrome_metrics_service_client.h

Issue 293023005: Move MetricsService final log collection tasks to client. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 7 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/metrics/chrome_metrics_service_client.h
===================================================================
--- chrome/browser/metrics/chrome_metrics_service_client.h (revision 271878)
+++ chrome/browser/metrics/chrome_metrics_service_client.h (working copy)
@@ -8,6 +8,8 @@
#include <string>
#include "base/basictypes.h"
+#include "base/callback.h"
+#include "base/memory/weak_ptr.h"
#include "components/metrics/metrics_service_client.h"
// ChromeMetricsServiceClient provides an implementation of MetricsServiceClient
@@ -24,8 +26,26 @@
virtual bool GetBrand(std::string* brand_code) OVERRIDE;
virtual metrics::SystemProfileProto::Channel GetChannel() OVERRIDE;
virtual std::string GetVersionString() OVERRIDE;
+ virtual void CollectFinalMetrics(const base::Closure& done_callback)
+ OVERRIDE;
private:
+ // Callbacks for various stages of final log info collection. Do not call
+ // these directly.
+ void OnMemoryDetailCollectionDone();
+ void OnHistogramSynchronizationDone();
+
+ // Saved callback received from OnFinalLogCollection().
+ base::Closure final_log_collection_done_callback_;
+
+ // Indicates that the final log collection step is running.
+ bool waiting_for_final_log_collection_step_;
Ilya Sherman 2014/05/21 14:22:55 nit: Now that the method is named "CollectFinalMet
Alexei Svitkine (slow) 2014/05/21 14:32:48 Done. Also renamed final_log_collection_done_callb
+
+ // Number of async histogram fetch requests in progress.
+ int num_async_histogram_fetches_in_progress_;
+
+ base::WeakPtrFactory<ChromeMetricsServiceClient> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(ChromeMetricsServiceClient);
};

Powered by Google App Engine
This is Rietveld 408576698