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

Side by Side Diff: components/metrics/metrics_log_uploader.h

Issue 2774503002: Track network stack error codes from UMA and UKM (Closed)
Patch Set: Diffbase Created 3 years, 9 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 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 COMPONENTS_METRICS_METRICS_LOG_UPLOADER_H_ 5 #ifndef COMPONENTS_METRICS_METRICS_LOG_UPLOADER_H_
6 #define COMPONENTS_METRICS_METRICS_LOG_UPLOADER_H_ 6 #define COMPONENTS_METRICS_METRICS_LOG_UPLOADER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/strings/string_piece.h" 12 #include "base/strings/string_piece.h"
13 13
14 namespace metrics { 14 namespace metrics {
15 15
16 // MetricsLogUploader is an abstract base class for uploading UMA logs on behalf 16 // MetricsLogUploader is an abstract base class for uploading UMA logs on behalf
17 // of MetricsService. 17 // of MetricsService.
18 class MetricsLogUploader { 18 class MetricsLogUploader {
19 public: 19 public:
20 typedef base::Callback<void(int, int)> UploadCallback;
Alexei Svitkine (slow) 2017/03/23 15:23:42 Nit: Document the parameters please.
Steven Holte 2017/03/23 20:38:07 Done.
21
20 // Possible service types. This should correspond to a type from 22 // Possible service types. This should correspond to a type from
21 // DataUseUserData. 23 // DataUseUserData.
22 enum MetricServiceType { 24 enum MetricServiceType {
23 UMA, 25 UMA,
24 UKM, 26 UKM,
25 }; 27 };
26 28
27 virtual ~MetricsLogUploader() {} 29 virtual ~MetricsLogUploader() {}
28 30
29 // Uploads a log with the specified |compressed_log_data| and |log_hash|. 31 // Uploads a log with the specified |compressed_log_data| and |log_hash|.
30 // |log_hash| is expected to be the hex-encoded SHA1 hash of the log data 32 // |log_hash| is expected to be the hex-encoded SHA1 hash of the log data
31 // before compression. 33 // before compression.
32 virtual void UploadLog(const std::string& compressed_log_data, 34 virtual void UploadLog(const std::string& compressed_log_data,
33 const std::string& log_hash) = 0; 35 const std::string& log_hash) = 0;
34 }; 36 };
35 37
36 } // namespace metrics 38 } // namespace metrics
37 39
38 #endif // COMPONENTS_METRICS_METRICS_LOG_UPLOADER_H_ 40 #endif // COMPONENTS_METRICS_METRICS_LOG_UPLOADER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698