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

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

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 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 TestMetricsLogUploader(const std::string& server_url, 14 TestMetricsLogUploader(const std::string& server_url,
15 const std::string& mime_type, 15 const std::string& mime_type,
16 MetricsLogUploader::MetricServiceType service_type,
16 const base::Callback<void(int)>& on_upload_complete); 17 const base::Callback<void(int)>& on_upload_complete);
17 ~TestMetricsLogUploader() override; 18 ~TestMetricsLogUploader() override;
18 19
19 // Mark the current upload complete with the given response code. 20 // Mark the current upload complete with the given response code.
20 void CompleteUpload(int response_code); 21 void CompleteUpload(int response_code);
21 22
22 // Check if UploadLog has been called. 23 // Check if UploadLog has been called.
23 bool is_uploading() const { return is_uploading_; } 24 bool is_uploading() const { return is_uploading_; }
24 25
25 private: 26 private:
26 // MetricsLogUploader: 27 // MetricsLogUploader:
27 void UploadLog(const std::string& compressed_log_data, 28 void UploadLog(const std::string& compressed_log_data,
28 const std::string& log_hash) override; 29 const std::string& log_hash) override;
29 30
30 bool is_uploading_; 31 bool is_uploading_;
31 32
32 DISALLOW_COPY_AND_ASSIGN(TestMetricsLogUploader); 33 DISALLOW_COPY_AND_ASSIGN(TestMetricsLogUploader);
33 }; 34 };
34 35
35 } // namespace metrics 36 } // namespace metrics
36 37
37 #endif // COMPONENTS_METRICS_TEST_METRICS_LOG_UPLOADER_H_ 38 #endif // COMPONENTS_METRICS_TEST_METRICS_LOG_UPLOADER_H_
OLDNEW
« no previous file with comments | « components/metrics/net/net_metrics_log_uploader_unittest.cc ('k') | components/metrics/test_metrics_log_uploader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698