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 #import <UIKit/UIKit.h> | 5 #import <UIKit/UIKit.h> |
6 | 6 |
7 #import "ios/chrome/today_extension/today_metrics_logger.h" | 7 #import "ios/chrome/today_extension/today_metrics_logger.h" |
8 | 8 |
9 #include "base/base64.h" | 9 #include "base/base64.h" |
10 #include "base/cpu.h" | 10 #include "base/cpu.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 int32_t GetProduct() override; | 60 int32_t GetProduct() override; |
61 std::string GetApplicationLocale() override; | 61 std::string GetApplicationLocale() override; |
62 bool GetBrand(std::string* brand_code) override; | 62 bool GetBrand(std::string* brand_code) override; |
63 metrics::SystemProfileProto::Channel GetChannel() override; | 63 metrics::SystemProfileProto::Channel GetChannel() override; |
64 std::string GetVersionString() override; | 64 std::string GetVersionString() override; |
65 void OnLogUploadComplete() override; | 65 void OnLogUploadComplete() override; |
66 void InitializeSystemProfileMetrics( | 66 void InitializeSystemProfileMetrics( |
67 const base::Closure& done_callback) override; | 67 const base::Closure& done_callback) override; |
68 void CollectFinalMetricsForLog(const base::Closure& done_callback) override; | 68 void CollectFinalMetricsForLog(const base::Closure& done_callback) override; |
69 std::unique_ptr<metrics::MetricsLogUploader> CreateUploader( | 69 std::unique_ptr<metrics::MetricsLogUploader> CreateUploader( |
| 70 const std::string& server_url, |
| 71 const std::string& mime_type, |
70 const base::Callback<void(int)>& on_upload_complete) override; | 72 const base::Callback<void(int)>& on_upload_complete) override; |
71 base::TimeDelta GetStandardUploadInterval() override; | 73 base::TimeDelta GetStandardUploadInterval() override; |
72 | 74 |
73 private: | 75 private: |
74 DISALLOW_COPY_AND_ASSIGN(TodayMetricsServiceClient); | 76 DISALLOW_COPY_AND_ASSIGN(TodayMetricsServiceClient); |
75 }; | 77 }; |
76 | 78 |
77 class TodayMetricsLog : public metrics::MetricsLog { | 79 class TodayMetricsLog : public metrics::MetricsLog { |
78 public: | 80 public: |
79 // Creates a new today metrics log of the specified type. | 81 // Creates a new today metrics log of the specified type. |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 NOTREACHED(); | 144 NOTREACHED(); |
143 } | 145 } |
144 | 146 |
145 void TodayMetricsServiceClient::CollectFinalMetricsForLog( | 147 void TodayMetricsServiceClient::CollectFinalMetricsForLog( |
146 const base::Closure& done_callback) { | 148 const base::Closure& done_callback) { |
147 NOTREACHED(); | 149 NOTREACHED(); |
148 } | 150 } |
149 | 151 |
150 std::unique_ptr<metrics::MetricsLogUploader> | 152 std::unique_ptr<metrics::MetricsLogUploader> |
151 TodayMetricsServiceClient::CreateUploader( | 153 TodayMetricsServiceClient::CreateUploader( |
| 154 const std::string& server_url, |
| 155 const std::string& mime_type, |
152 const base::Callback<void(int)>& on_upload_complete) { | 156 const base::Callback<void(int)>& on_upload_complete) { |
153 NOTREACHED(); | 157 NOTREACHED(); |
154 return nullptr; | 158 return nullptr; |
155 } | 159 } |
156 | 160 |
157 base::TimeDelta TodayMetricsServiceClient::GetStandardUploadInterval() { | 161 base::TimeDelta TodayMetricsServiceClient::GetStandardUploadInterval() { |
158 NOTREACHED(); | 162 NOTREACHED(); |
159 return base::TimeDelta::FromSeconds(0); | 163 return base::TimeDelta::FromSeconds(0); |
160 } | 164 } |
161 | 165 |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 void TodayMetricsLogger::UniqueInconsistencyDetected( | 297 void TodayMetricsLogger::UniqueInconsistencyDetected( |
294 base::HistogramBase::Inconsistency problem) { | 298 base::HistogramBase::Inconsistency problem) { |
295 UMA_HISTOGRAM_ENUMERATION("Histogram.InconsistenciesBrowserUnique", problem, | 299 UMA_HISTOGRAM_ENUMERATION("Histogram.InconsistenciesBrowserUnique", problem, |
296 base::HistogramBase::NEVER_EXCEEDED_VALUE); | 300 base::HistogramBase::NEVER_EXCEEDED_VALUE); |
297 } | 301 } |
298 | 302 |
299 void TodayMetricsLogger::InconsistencyDetectedInLoggedCount(int amount) { | 303 void TodayMetricsLogger::InconsistencyDetectedInLoggedCount(int amount) { |
300 UMA_HISTOGRAM_COUNTS("Histogram.InconsistentSnapshotBrowser", | 304 UMA_HISTOGRAM_COUNTS("Histogram.InconsistentSnapshotBrowser", |
301 std::abs(amount)); | 305 std::abs(amount)); |
302 } | 306 } |
OLD | NEW |