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

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

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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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_TEST_METRICS_LOG_UPLOADER_H_ 5 #ifndef COMPONENTS_METRICS_TEST_METRICS_LOG_UPLOADER_H_
6 #define COMPONENTS_METRICS_TEST_METRICS_LOG_UPLOADER_H_ 6 #define COMPONENTS_METRICS_TEST_METRICS_LOG_UPLOADER_H_
7 7
8 #include "components/metrics/metrics_log_uploader.h" 8 #include "components/metrics/metrics_log_uploader.h"
9 9
10 namespace metrics { 10 namespace metrics {
11 11
12 class TestMetricsLogUploader : public MetricsLogUploader { 12 class TestMetricsLogUploader : public MetricsLogUploader {
13 public: 13 public:
14 explicit TestMetricsLogUploader( 14 explicit TestMetricsLogUploader(
15 const base::Callback<void(int)>& on_upload_complete); 15 const MetricsLogUploader::UploadCallback& on_upload_complete);
16 ~TestMetricsLogUploader() override; 16 ~TestMetricsLogUploader() override;
17 17
18 // Mark the current upload complete with the given response code. 18 // Mark the current upload complete with the given response code.
19 void CompleteUpload(int response_code); 19 void CompleteUpload(int response_code);
20 20
21 // Check if UploadLog has been called. 21 // Check if UploadLog has been called.
22 bool is_uploading() const { return is_uploading_; } 22 bool is_uploading() const { return is_uploading_; }
23 23
24 private: 24 private:
25 // MetricsLogUploader: 25 // MetricsLogUploader:
26 void UploadLog(const std::string& compressed_log_data, 26 void UploadLog(const std::string& compressed_log_data,
27 const std::string& log_hash) override; 27 const std::string& log_hash) override;
28 28
29 const base::Callback<void(int)> on_upload_complete_; 29 const MetricsLogUploader::UploadCallback on_upload_complete_;
30 bool is_uploading_; 30 bool is_uploading_;
31 31
32 DISALLOW_COPY_AND_ASSIGN(TestMetricsLogUploader); 32 DISALLOW_COPY_AND_ASSIGN(TestMetricsLogUploader);
33 }; 33 };
34 34
35 } // namespace metrics 35 } // namespace metrics
36 36
37 #endif // COMPONENTS_METRICS_TEST_METRICS_LOG_UPLOADER_H_ 37 #endif // COMPONENTS_METRICS_TEST_METRICS_LOG_UPLOADER_H_
OLDNEW
« no previous file with comments | « components/metrics/reporting_service.cc ('k') | components/metrics/test_metrics_log_uploader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698