Chromium Code Reviews| 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/bind.h" |
|
Ilya Sherman
2014/05/21 13:37:07
nit: base/callback.h
Alexei Svitkine (slow)
2014/05/21 14:20:15
Done.
|
| +#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 OnFinalLogCollection(const base::Closure& done_callback) |
| + OVERRIDE; |
|
Ilya Sherman
2014/05/21 13:37:07
nit: Hmm, this name is not super clear as to what
Alexei Svitkine (slow)
2014/05/21 14:20:15
Done. Went with CollectFinalMetrics().
|
| 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 an asynchronous reporting step is running. |
| + bool waiting_for_asynchronous_reporting_step_; |
| + |
| + // 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); |
| }; |