Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(601)

Side by Side Diff: ios/chrome/today_extension/today_metrics_logger.mm

Issue 2708293002: Switch UKM service to properly mark upload data as UKM and not UMA. (Closed)
Patch Set: no switch default now requires a default value Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 std::string GetApplicationLocale() override; 64 std::string GetApplicationLocale() override;
65 bool GetBrand(std::string* brand_code) override; 65 bool GetBrand(std::string* brand_code) override;
66 metrics::SystemProfileProto::Channel GetChannel() override; 66 metrics::SystemProfileProto::Channel GetChannel() override;
67 std::string GetVersionString() override; 67 std::string GetVersionString() override;
68 void InitializeSystemProfileMetrics( 68 void InitializeSystemProfileMetrics(
69 const base::Closure& done_callback) override; 69 const base::Closure& done_callback) override;
70 void CollectFinalMetricsForLog(const base::Closure& done_callback) override; 70 void CollectFinalMetricsForLog(const base::Closure& done_callback) override;
71 std::unique_ptr<metrics::MetricsLogUploader> CreateUploader( 71 std::unique_ptr<metrics::MetricsLogUploader> CreateUploader(
72 const std::string& server_url, 72 const std::string& server_url,
73 const std::string& mime_type, 73 const std::string& mime_type,
74 metrics::MetricsLogUploader::MetricServiceType service_type,
74 const base::Callback<void(int)>& on_upload_complete) override; 75 const base::Callback<void(int)>& on_upload_complete) override;
75 base::TimeDelta GetStandardUploadInterval() override; 76 base::TimeDelta GetStandardUploadInterval() override;
76 77
77 private: 78 private:
78 DISALLOW_COPY_AND_ASSIGN(TodayMetricsServiceClient); 79 DISALLOW_COPY_AND_ASSIGN(TodayMetricsServiceClient);
79 }; 80 };
80 81
81 class TodayMetricsLog : public metrics::MetricsLog { 82 class TodayMetricsLog : public metrics::MetricsLog {
82 public: 83 public:
83 // Creates a new today metrics log of the specified type. 84 // Creates a new today metrics log of the specified type.
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 145
145 void TodayMetricsServiceClient::CollectFinalMetricsForLog( 146 void TodayMetricsServiceClient::CollectFinalMetricsForLog(
146 const base::Closure& done_callback) { 147 const base::Closure& done_callback) {
147 NOTREACHED(); 148 NOTREACHED();
148 } 149 }
149 150
150 std::unique_ptr<metrics::MetricsLogUploader> 151 std::unique_ptr<metrics::MetricsLogUploader>
151 TodayMetricsServiceClient::CreateUploader( 152 TodayMetricsServiceClient::CreateUploader(
152 const std::string& server_url, 153 const std::string& server_url,
153 const std::string& mime_type, 154 const std::string& mime_type,
155 metrics::MetricsLogUploader::MetricServiceType service_type,
154 const base::Callback<void(int)>& on_upload_complete) { 156 const base::Callback<void(int)>& on_upload_complete) {
155 NOTREACHED(); 157 NOTREACHED();
156 return nullptr; 158 return nullptr;
157 } 159 }
158 160
159 base::TimeDelta TodayMetricsServiceClient::GetStandardUploadInterval() { 161 base::TimeDelta TodayMetricsServiceClient::GetStandardUploadInterval() {
160 NOTREACHED(); 162 NOTREACHED();
161 return base::TimeDelta::FromSeconds(0); 163 return base::TimeDelta::FromSeconds(0);
162 } 164 }
163 165
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 void TodayMetricsLogger::UniqueInconsistencyDetected( 297 void TodayMetricsLogger::UniqueInconsistencyDetected(
296 base::HistogramBase::Inconsistency problem) { 298 base::HistogramBase::Inconsistency problem) {
297 UMA_HISTOGRAM_ENUMERATION("Histogram.InconsistenciesBrowserUnique", problem, 299 UMA_HISTOGRAM_ENUMERATION("Histogram.InconsistenciesBrowserUnique", problem,
298 base::HistogramBase::NEVER_EXCEEDED_VALUE); 300 base::HistogramBase::NEVER_EXCEEDED_VALUE);
299 } 301 }
300 302
301 void TodayMetricsLogger::InconsistencyDetectedInLoggedCount(int amount) { 303 void TodayMetricsLogger::InconsistencyDetectedInLoggedCount(int amount) {
302 UMA_HISTOGRAM_COUNTS("Histogram.InconsistentSnapshotBrowser", 304 UMA_HISTOGRAM_COUNTS("Histogram.InconsistentSnapshotBrowser",
303 std::abs(amount)); 305 std::abs(amount));
304 } 306 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/metrics/ios_chrome_metrics_service_client.mm ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698