OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_ | 5 #ifndef CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_ |
6 #define CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_ | 6 #define CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 virtual ~ChromeMetricsServiceClient(); | 27 virtual ~ChromeMetricsServiceClient(); |
28 | 28 |
29 // metrics::MetricsServiceClient: | 29 // metrics::MetricsServiceClient: |
30 virtual void SetClientID(const std::string& client_id) OVERRIDE; | 30 virtual void SetClientID(const std::string& client_id) OVERRIDE; |
31 virtual bool IsOffTheRecordSessionActive() OVERRIDE; | 31 virtual bool IsOffTheRecordSessionActive() OVERRIDE; |
32 virtual std::string GetApplicationLocale() OVERRIDE; | 32 virtual std::string GetApplicationLocale() OVERRIDE; |
33 virtual bool GetBrand(std::string* brand_code) OVERRIDE; | 33 virtual bool GetBrand(std::string* brand_code) OVERRIDE; |
34 virtual metrics::SystemProfileProto::Channel GetChannel() OVERRIDE; | 34 virtual metrics::SystemProfileProto::Channel GetChannel() OVERRIDE; |
35 virtual std::string GetVersionString() OVERRIDE; | 35 virtual std::string GetVersionString() OVERRIDE; |
36 virtual void OnLogUploadComplete() OVERRIDE; | 36 virtual void OnLogUploadComplete() OVERRIDE; |
| 37 virtual void StartGatheringMetrics( |
| 38 const base::Closure& done_callback) OVERRIDE; |
37 virtual void CollectFinalMetrics(const base::Closure& done_callback) | 39 virtual void CollectFinalMetrics(const base::Closure& done_callback) |
38 OVERRIDE; | 40 OVERRIDE; |
39 | 41 |
40 // Stores a weak pointer to the given |service|. | 42 // Stores a weak pointer to the given |service|. |
41 // TODO(isherman): Fix the memory ownership model so that this method is not | 43 // TODO(isherman): Fix the memory ownership model so that this method is not |
42 // needed: http://crbug.com/375248 | 44 // needed: http://crbug.com/375248 |
43 void set_service(MetricsService* service) { service_ = service; } | 45 void set_service(MetricsService* service) { service_ = service; } |
44 | 46 |
45 private: | 47 private: |
46 // Callbacks for various stages of final log info collection. Do not call | 48 // Callbacks for various stages of final log info collection. Do not call |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 | 81 |
80 // Number of async histogram fetch requests in progress. | 82 // Number of async histogram fetch requests in progress. |
81 int num_async_histogram_fetches_in_progress_; | 83 int num_async_histogram_fetches_in_progress_; |
82 | 84 |
83 base::WeakPtrFactory<ChromeMetricsServiceClient> weak_ptr_factory_; | 85 base::WeakPtrFactory<ChromeMetricsServiceClient> weak_ptr_factory_; |
84 | 86 |
85 DISALLOW_COPY_AND_ASSIGN(ChromeMetricsServiceClient); | 87 DISALLOW_COPY_AND_ASSIGN(ChromeMetricsServiceClient); |
86 }; | 88 }; |
87 | 89 |
88 #endif // CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_ | 90 #endif // CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_ |
OLD | NEW |