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

Side by Side Diff: components/domain_reliability/uploader.h

Issue 491753003: Domain Reliability: Don't upload when metrics reporting is off. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix a last couple of nits Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « components/domain_reliability/test_util.cc ('k') | components/domain_reliability/uploader.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_DOMAIN_RELIABILITY_UPLOADER_H_ 5 #ifndef COMPONENTS_DOMAIN_RELIABILITY_UPLOADER_H_
6 #define COMPONENTS_DOMAIN_RELIABILITY_UPLOADER_H_ 6 #define COMPONENTS_DOMAIN_RELIABILITY_UPLOADER_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
(...skipping 23 matching lines...) Expand all
34 // version.) 34 // version.)
35 static scoped_ptr<DomainReliabilityUploader> Create(const scoped_refptr< 35 static scoped_ptr<DomainReliabilityUploader> Create(const scoped_refptr<
36 net::URLRequestContextGetter>& url_request_context_getter); 36 net::URLRequestContextGetter>& url_request_context_getter);
37 37
38 // Uploads |report_json| to |upload_url| and calls |callback| when the upload 38 // Uploads |report_json| to |upload_url| and calls |callback| when the upload
39 // has either completed or failed. 39 // has either completed or failed.
40 virtual void UploadReport(const std::string& report_json, 40 virtual void UploadReport(const std::string& report_json,
41 const GURL& upload_url, 41 const GURL& upload_url,
42 const UploadCallback& callback) = 0; 42 const UploadCallback& callback) = 0;
43 43
44 virtual void set_discard_uploads(bool discard_uploads) = 0;
45
44 static bool URLRequestIsUpload(const net::URLRequest& request); 46 static bool URLRequestIsUpload(const net::URLRequest& request);
45 }; 47 };
46 48
47 } // namespace domain_reliability 49 } // namespace domain_reliability
48 50
49 #endif // COMPONENTS_DOMAIN_RELIABILITY_UPLOADER_H_ 51 #endif // COMPONENTS_DOMAIN_RELIABILITY_UPLOADER_H_
OLDNEW
« no previous file with comments | « components/domain_reliability/test_util.cc ('k') | components/domain_reliability/uploader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698