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

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

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 #include "components/metrics/test_metrics_log_uploader.h" 5 #include "components/metrics/test_metrics_log_uploader.h"
6 #include "components/metrics/metrics_log_uploader.h" 6 #include "components/metrics/metrics_log_uploader.h"
7 7
8 namespace metrics { 8 namespace metrics {
9 9
10 TestMetricsLogUploader::TestMetricsLogUploader( 10 TestMetricsLogUploader::TestMetricsLogUploader(
11 const base::Callback<void(int)>& on_upload_complete) 11 const MetricsLogUploader::UploadCallback& on_upload_complete)
12 : on_upload_complete_(on_upload_complete), is_uploading_(false) {} 12 : on_upload_complete_(on_upload_complete), is_uploading_(false) {}
13 13
14 TestMetricsLogUploader::~TestMetricsLogUploader() = default; 14 TestMetricsLogUploader::~TestMetricsLogUploader() = default;
15 15
16 void TestMetricsLogUploader::CompleteUpload(int response_code) { 16 void TestMetricsLogUploader::CompleteUpload(int response_code) {
17 DCHECK(is_uploading_); 17 DCHECK(is_uploading_);
18 is_uploading_ = false; 18 is_uploading_ = false;
19 on_upload_complete_.Run(response_code); 19 on_upload_complete_.Run(response_code, 0);
20 } 20 }
21 21
22 void TestMetricsLogUploader::UploadLog(const std::string& compressed_log_data, 22 void TestMetricsLogUploader::UploadLog(const std::string& compressed_log_data,
23 const std::string& log_hash) { 23 const std::string& log_hash) {
24 DCHECK(!is_uploading_); 24 DCHECK(!is_uploading_);
25 is_uploading_ = true; 25 is_uploading_ = true;
26 } 26 }
27 27
28 } // namespace metrics 28 } // namespace metrics
OLDNEW
« no previous file with comments | « components/metrics/test_metrics_log_uploader.h ('k') | components/metrics/test_metrics_service_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698