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

Side by Side Diff: components/metrics/net/net_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 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_NET_NET_METRICS_LOG_UPLOADER_H_ 5 #ifndef COMPONENTS_METRICS_NET_NET_METRICS_LOG_UPLOADER_H_
6 #define COMPONENTS_METRICS_NET_NET_METRICS_LOG_UPLOADER_H_ 6 #define COMPONENTS_METRICS_NET_NET_METRICS_LOG_UPLOADER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 12 matching lines...) Expand all
23 class NetMetricsLogUploader : public MetricsLogUploader, 23 class NetMetricsLogUploader : public MetricsLogUploader,
24 public net::URLFetcherDelegate { 24 public net::URLFetcherDelegate {
25 public: 25 public:
26 // Constructs a NetMetricsLogUploader with the specified request context and 26 // Constructs a NetMetricsLogUploader with the specified request context and
27 // other params (see comments on MetricsLogUploader for details). The caller 27 // other params (see comments on MetricsLogUploader for details). The caller
28 // must ensure that |request_context_getter| remains valid for the lifetime 28 // must ensure that |request_context_getter| remains valid for the lifetime
29 // of this class. 29 // of this class.
30 NetMetricsLogUploader(net::URLRequestContextGetter* request_context_getter, 30 NetMetricsLogUploader(net::URLRequestContextGetter* request_context_getter,
31 const std::string& server_url, 31 const std::string& server_url,
32 const std::string& mime_type, 32 const std::string& mime_type,
33 MetricsLogUploader::MetricServiceType service_type,
33 const base::Callback<void(int)>& on_upload_complete); 34 const base::Callback<void(int)>& on_upload_complete);
34 ~NetMetricsLogUploader() override; 35 ~NetMetricsLogUploader() override;
35 36
36 // MetricsLogUploader: 37 // MetricsLogUploader:
37 void UploadLog(const std::string& compressed_log_data, 38 void UploadLog(const std::string& compressed_log_data,
38 const std::string& log_hash) override; 39 const std::string& log_hash) override;
39 40
40 private: 41 private:
41 // net::URLFetcherDelegate: 42 // net::URLFetcherDelegate:
42 void OnURLFetchComplete(const net::URLFetcher* source) override; 43 void OnURLFetchComplete(const net::URLFetcher* source) override;
43 44
44 // The request context for fetches done using the network stack. 45 // The request context for fetches done using the network stack.
45 net::URLRequestContextGetter* const request_context_getter_; 46 net::URLRequestContextGetter* const request_context_getter_;
46 47
47 // The outstanding transmission appears as a URL Fetch operation. 48 // The outstanding transmission appears as a URL Fetch operation.
48 std::unique_ptr<net::URLFetcher> current_fetch_; 49 std::unique_ptr<net::URLFetcher> current_fetch_;
49 50
50 DISALLOW_COPY_AND_ASSIGN(NetMetricsLogUploader); 51 DISALLOW_COPY_AND_ASSIGN(NetMetricsLogUploader);
51 }; 52 };
52 53
53 } // namespace metrics 54 } // namespace metrics
54 55
55 #endif // COMPONENTS_METRICS_NET_NET_METRICS_LOG_UPLOADER_H_ 56 #endif // COMPONENTS_METRICS_NET_NET_METRICS_LOG_UPLOADER_H_
OLDNEW
« no previous file with comments | « components/metrics/metrics_service_client.h ('k') | components/metrics/net/net_metrics_log_uploader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698