OLD | NEW |
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 Loading... |
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_ |
OLD | NEW |