OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 IOS_CHROME_BROWSER_METRICS_IOS_CHROME_METRICS_SERVICE_CLIENT_H_ | 5 #ifndef IOS_CHROME_BROWSER_METRICS_IOS_CHROME_METRICS_SERVICE_CLIENT_H_ |
6 #define IOS_CHROME_BROWSER_METRICS_IOS_CHROME_METRICS_SERVICE_CLIENT_H_ | 6 #define IOS_CHROME_BROWSER_METRICS_IOS_CHROME_METRICS_SERVICE_CLIENT_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 #include <set> | 11 #include <set> |
12 #include <string> | 12 #include <string> |
13 | 13 |
14 #include "base/callback.h" | 14 #include "base/callback.h" |
15 #include "base/macros.h" | 15 #include "base/macros.h" |
16 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
17 #include "base/threading/thread_checker.h" | 17 #include "base/threading/thread_checker.h" |
| 18 #include "components/metrics/metrics_log_uploader.h" |
18 #include "components/metrics/metrics_service_client.h" | 19 #include "components/metrics/metrics_service_client.h" |
19 #include "components/metrics/profiler/tracking_synchronizer_observer.h" | 20 #include "components/metrics/profiler/tracking_synchronizer_observer.h" |
20 #include "components/omnibox/browser/omnibox_event_global_tracker.h" | 21 #include "components/omnibox/browser/omnibox_event_global_tracker.h" |
21 #include "components/ukm/observers/history_delete_observer.h" | 22 #include "components/ukm/observers/history_delete_observer.h" |
22 #include "components/ukm/observers/sync_disable_observer.h" | 23 #include "components/ukm/observers/sync_disable_observer.h" |
23 #include "ios/web/public/web_state/global_web_state_observer.h" | 24 #include "ios/web/public/web_state/global_web_state_observer.h" |
24 | 25 |
25 class IOSChromeStabilityMetricsProvider; | 26 class IOSChromeStabilityMetricsProvider; |
26 class PrefRegistrySimple; | 27 class PrefRegistrySimple; |
27 | 28 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 std::string GetApplicationLocale() override; | 67 std::string GetApplicationLocale() override; |
67 bool GetBrand(std::string* brand_code) override; | 68 bool GetBrand(std::string* brand_code) override; |
68 metrics::SystemProfileProto::Channel GetChannel() override; | 69 metrics::SystemProfileProto::Channel GetChannel() override; |
69 std::string GetVersionString() override; | 70 std::string GetVersionString() override; |
70 void InitializeSystemProfileMetrics( | 71 void InitializeSystemProfileMetrics( |
71 const base::Closure& done_callback) override; | 72 const base::Closure& done_callback) override; |
72 void CollectFinalMetricsForLog(const base::Closure& done_callback) override; | 73 void CollectFinalMetricsForLog(const base::Closure& done_callback) override; |
73 std::unique_ptr<metrics::MetricsLogUploader> CreateUploader( | 74 std::unique_ptr<metrics::MetricsLogUploader> CreateUploader( |
74 const std::string& server_url, | 75 const std::string& server_url, |
75 const std::string& mime_type, | 76 const std::string& mime_type, |
| 77 metrics::MetricsLogUploader::MetricServiceType service_type, |
76 const base::Callback<void(int)>& on_upload_complete) override; | 78 const base::Callback<void(int)>& on_upload_complete) override; |
77 base::TimeDelta GetStandardUploadInterval() override; | 79 base::TimeDelta GetStandardUploadInterval() override; |
78 base::string16 GetRegistryBackupKey() override; | 80 base::string16 GetRegistryBackupKey() override; |
79 void OnRendererProcessCrash() override; | 81 void OnRendererProcessCrash() override; |
80 bool IsHistorySyncEnabledOnAllProfiles() override; | 82 bool IsHistorySyncEnabledOnAllProfiles() override; |
81 | 83 |
82 // ukm::HistoryDeleteObserver: | 84 // ukm::HistoryDeleteObserver: |
83 void OnHistoryDeleted() override; | 85 void OnHistoryDeleted() override; |
84 | 86 |
85 // ukm::SyncDisableObserver: | 87 // ukm::SyncDisableObserver: |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 // Whether this client has already uploaded profiler data during this session. | 179 // Whether this client has already uploaded profiler data during this session. |
178 // Profiler data is uploaded at most once per session. | 180 // Profiler data is uploaded at most once per session. |
179 bool has_uploaded_profiler_data_; | 181 bool has_uploaded_profiler_data_; |
180 | 182 |
181 base::WeakPtrFactory<IOSChromeMetricsServiceClient> weak_ptr_factory_; | 183 base::WeakPtrFactory<IOSChromeMetricsServiceClient> weak_ptr_factory_; |
182 | 184 |
183 DISALLOW_COPY_AND_ASSIGN(IOSChromeMetricsServiceClient); | 185 DISALLOW_COPY_AND_ASSIGN(IOSChromeMetricsServiceClient); |
184 }; | 186 }; |
185 | 187 |
186 #endif // IOS_CHROME_BROWSER_METRICS_IOS_CHROME_METRICS_SERVICE_CLIENT_H_ | 188 #endif // IOS_CHROME_BROWSER_METRICS_IOS_CHROME_METRICS_SERVICE_CLIENT_H_ |
OLD | NEW |