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

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

Issue 2774503002: Track network stack error codes from UMA and UKM (Closed)
Patch Set: Rebase on Created 3 years, 8 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 base::StringPiece server_url, 72 base::StringPiece server_url,
73 base::StringPiece mime_type, 73 base::StringPiece mime_type,
74 metrics::MetricsLogUploader::MetricServiceType service_type, 74 metrics::MetricsLogUploader::MetricServiceType service_type,
75 const base::Callback<void(int)>& on_upload_complete) override; 75 const metrics::MetricsLogUploader::UploadCallback& on_upload_complete)
76 override;
76 base::TimeDelta GetStandardUploadInterval() override; 77 base::TimeDelta GetStandardUploadInterval() override;
77 78
78 private: 79 private:
79 DISALLOW_COPY_AND_ASSIGN(TodayMetricsServiceClient); 80 DISALLOW_COPY_AND_ASSIGN(TodayMetricsServiceClient);
80 }; 81 };
81 82
82 class TodayMetricsLog : public metrics::MetricsLog { 83 class TodayMetricsLog : public metrics::MetricsLog {
83 public: 84 public:
84 // Creates a new today metrics log of the specified type. 85 // Creates a new today metrics log of the specified type.
85 // TodayMetricsLog is similar to metrics::MetricsLog but allow serialization 86 // TodayMetricsLog is similar to metrics::MetricsLog but allow serialization
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 void TodayMetricsServiceClient::CollectFinalMetricsForLog( 147 void TodayMetricsServiceClient::CollectFinalMetricsForLog(
147 const base::Closure& done_callback) { 148 const base::Closure& done_callback) {
148 NOTREACHED(); 149 NOTREACHED();
149 } 150 }
150 151
151 std::unique_ptr<metrics::MetricsLogUploader> 152 std::unique_ptr<metrics::MetricsLogUploader>
152 TodayMetricsServiceClient::CreateUploader( 153 TodayMetricsServiceClient::CreateUploader(
153 base::StringPiece server_url, 154 base::StringPiece server_url,
154 base::StringPiece mime_type, 155 base::StringPiece mime_type,
155 metrics::MetricsLogUploader::MetricServiceType service_type, 156 metrics::MetricsLogUploader::MetricServiceType service_type,
156 const base::Callback<void(int)>& on_upload_complete) { 157 const metrics::MetricsLogUploader::UploadCallback& on_upload_complete) {
157 NOTREACHED(); 158 NOTREACHED();
158 return nullptr; 159 return nullptr;
159 } 160 }
160 161
161 base::TimeDelta TodayMetricsServiceClient::GetStandardUploadInterval() { 162 base::TimeDelta TodayMetricsServiceClient::GetStandardUploadInterval() {
162 NOTREACHED(); 163 NOTREACHED();
163 return base::TimeDelta::FromSeconds(0); 164 return base::TimeDelta::FromSeconds(0);
164 } 165 }
165 166
166 TodayMetricsLog::TodayMetricsLog(const std::string& client_id, 167 TodayMetricsLog::TodayMetricsLog(const std::string& client_id,
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 void TodayMetricsLogger::UniqueInconsistencyDetected( 298 void TodayMetricsLogger::UniqueInconsistencyDetected(
298 base::HistogramBase::Inconsistency problem) { 299 base::HistogramBase::Inconsistency problem) {
299 UMA_HISTOGRAM_ENUMERATION("Histogram.InconsistenciesBrowserUnique", problem, 300 UMA_HISTOGRAM_ENUMERATION("Histogram.InconsistenciesBrowserUnique", problem,
300 base::HistogramBase::NEVER_EXCEEDED_VALUE); 301 base::HistogramBase::NEVER_EXCEEDED_VALUE);
301 } 302 }
302 303
303 void TodayMetricsLogger::InconsistencyDetectedInLoggedCount(int amount) { 304 void TodayMetricsLogger::InconsistencyDetectedInLoggedCount(int amount) {
304 UMA_HISTOGRAM_COUNTS("Histogram.InconsistentSnapshotBrowser", 305 UMA_HISTOGRAM_COUNTS("Histogram.InconsistentSnapshotBrowser",
305 std::abs(amount)); 306 std::abs(amount));
306 } 307 }
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