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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <deque> | 10 #include <deque> |
11 #include <memory> | 11 #include <memory> |
12 #include <queue> | 12 #include <queue> |
13 #include <string> | 13 #include <string> |
14 | 14 |
15 #include "base/callback.h" | 15 #include "base/callback.h" |
16 #include "base/macros.h" | 16 #include "base/macros.h" |
17 #include "base/memory/weak_ptr.h" | 17 #include "base/memory/weak_ptr.h" |
18 #include "base/threading/thread_checker.h" | 18 #include "base/threading/thread_checker.h" |
19 #include "build/build_config.h" | 19 #include "build/build_config.h" |
20 #include "chrome/browser/metrics/metrics_memory_details.h" | 20 #include "chrome/browser/metrics/metrics_memory_details.h" |
| 21 #include "components/metrics/metrics_log_uploader.h" |
21 #include "components/metrics/metrics_service_client.h" | 22 #include "components/metrics/metrics_service_client.h" |
22 #include "components/metrics/profiler/tracking_synchronizer_observer.h" | 23 #include "components/metrics/profiler/tracking_synchronizer_observer.h" |
23 #include "components/metrics/proto/system_profile.pb.h" | 24 #include "components/metrics/proto/system_profile.pb.h" |
24 #include "components/omnibox/browser/omnibox_event_global_tracker.h" | 25 #include "components/omnibox/browser/omnibox_event_global_tracker.h" |
25 #include "components/ukm/observers/history_delete_observer.h" | 26 #include "components/ukm/observers/history_delete_observer.h" |
26 #include "components/ukm/observers/sync_disable_observer.h" | 27 #include "components/ukm/observers/sync_disable_observer.h" |
27 #include "content/public/browser/notification_observer.h" | 28 #include "content/public/browser/notification_observer.h" |
28 #include "content/public/browser/notification_registrar.h" | 29 #include "content/public/browser/notification_registrar.h" |
29 #include "ppapi/features/features.h" | 30 #include "ppapi/features/features.h" |
30 | 31 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 metrics::SystemProfileProto::Channel GetChannel() override; | 74 metrics::SystemProfileProto::Channel GetChannel() override; |
74 std::string GetVersionString() override; | 75 std::string GetVersionString() override; |
75 void OnEnvironmentUpdate(std::string* serialized_environment) override; | 76 void OnEnvironmentUpdate(std::string* serialized_environment) override; |
76 void OnLogCleanShutdown() override; | 77 void OnLogCleanShutdown() override; |
77 void InitializeSystemProfileMetrics( | 78 void InitializeSystemProfileMetrics( |
78 const base::Closure& done_callback) override; | 79 const base::Closure& done_callback) override; |
79 void CollectFinalMetricsForLog(const base::Closure& done_callback) override; | 80 void CollectFinalMetricsForLog(const base::Closure& done_callback) override; |
80 std::unique_ptr<metrics::MetricsLogUploader> CreateUploader( | 81 std::unique_ptr<metrics::MetricsLogUploader> CreateUploader( |
81 const std::string& server_url, | 82 const std::string& server_url, |
82 const std::string& mime_type, | 83 const std::string& mime_type, |
| 84 metrics::MetricsLogUploader::MetricServiceType service_type, |
83 const base::Callback<void(int)>& on_upload_complete) override; | 85 const base::Callback<void(int)>& on_upload_complete) override; |
84 base::TimeDelta GetStandardUploadInterval() override; | 86 base::TimeDelta GetStandardUploadInterval() override; |
85 base::string16 GetRegistryBackupKey() override; | 87 base::string16 GetRegistryBackupKey() override; |
86 void OnPluginLoadingError(const base::FilePath& plugin_path) override; | 88 void OnPluginLoadingError(const base::FilePath& plugin_path) override; |
87 bool IsReportingPolicyManaged() override; | 89 bool IsReportingPolicyManaged() override; |
88 metrics::EnableMetricsDefault GetMetricsReportingDefaultState() override; | 90 metrics::EnableMetricsDefault GetMetricsReportingDefaultState() override; |
89 bool IsUMACellularUploadLogicEnabled() override; | 91 bool IsUMACellularUploadLogicEnabled() override; |
90 bool IsHistorySyncEnabledOnAllProfiles() override; | 92 bool IsHistorySyncEnabledOnAllProfiles() override; |
91 | 93 |
92 // ukm::HistoryDeleteObserver: | 94 // ukm::HistoryDeleteObserver: |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 // Whether this client has already uploaded profiler data during this session. | 246 // Whether this client has already uploaded profiler data during this session. |
245 // Profiler data is uploaded at most once per session. | 247 // Profiler data is uploaded at most once per session. |
246 bool has_uploaded_profiler_data_; | 248 bool has_uploaded_profiler_data_; |
247 | 249 |
248 base::WeakPtrFactory<ChromeMetricsServiceClient> weak_ptr_factory_; | 250 base::WeakPtrFactory<ChromeMetricsServiceClient> weak_ptr_factory_; |
249 | 251 |
250 DISALLOW_COPY_AND_ASSIGN(ChromeMetricsServiceClient); | 252 DISALLOW_COPY_AND_ASSIGN(ChromeMetricsServiceClient); |
251 }; | 253 }; |
252 | 254 |
253 #endif // CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_ | 255 #endif // CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_ |
OLD | NEW |