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

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

Issue 1851933002: Convert //url to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: IWYU fixup 7 Created 4 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 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 #include <memory>
9 10
10 #include "base/callback_forward.h" 11 #include "base/callback_forward.h"
11 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
12 #include "base/time/time.h" 13 #include "base/time/time.h"
13 #include "components/domain_reliability/domain_reliability_export.h" 14 #include "components/domain_reliability/domain_reliability_export.h"
14 #include "url/gurl.h" 15 #include "url/gurl.h"
15 16
16 namespace net { 17 namespace net {
17 class URLFetcher; 18 class URLFetcher;
18 class URLRequest; 19 class URLRequest;
(...skipping 24 matching lines...) Expand all
43 44
44 typedef base::Callback<void(const UploadResult& result)> UploadCallback; 45 typedef base::Callback<void(const UploadResult& result)> UploadCallback;
45 46
46 DomainReliabilityUploader(); 47 DomainReliabilityUploader();
47 48
48 virtual ~DomainReliabilityUploader(); 49 virtual ~DomainReliabilityUploader();
49 50
50 // Creates an uploader that uses the given |url_request_context_getter| to 51 // Creates an uploader that uses the given |url_request_context_getter| to
51 // get a URLRequestContext to use for uploads. (See test_util.h for a mock 52 // get a URLRequestContext to use for uploads. (See test_util.h for a mock
52 // version.) 53 // version.)
53 static scoped_ptr<DomainReliabilityUploader> Create( 54 static std::unique_ptr<DomainReliabilityUploader> Create(
54 MockableTime* time, 55 MockableTime* time,
55 const scoped_refptr< 56 const scoped_refptr<net::URLRequestContextGetter>&
56 net::URLRequestContextGetter>& url_request_context_getter); 57 url_request_context_getter);
57 58
58 // Uploads |report_json| to |upload_url| and calls |callback| when the upload 59 // Uploads |report_json| to |upload_url| and calls |callback| when the upload
59 // has either completed or failed. 60 // has either completed or failed.
60 virtual void UploadReport(const std::string& report_json, 61 virtual void UploadReport(const std::string& report_json,
61 int max_beacon_depth, 62 int max_beacon_depth,
62 const GURL& upload_url, 63 const GURL& upload_url,
63 const UploadCallback& callback) = 0; 64 const UploadCallback& callback) = 0;
64 65
65 virtual void set_discard_uploads(bool discard_uploads) = 0; 66 virtual void set_discard_uploads(bool discard_uploads) = 0;
66 67
67 static int GetURLRequestUploadDepth(const net::URLRequest& request); 68 static int GetURLRequestUploadDepth(const net::URLRequest& request);
68 }; 69 };
69 70
70 } // namespace domain_reliability 71 } // namespace domain_reliability
71 72
72 #endif // COMPONENTS_DOMAIN_RELIABILITY_UPLOADER_H_ 73 #endif // COMPONENTS_DOMAIN_RELIABILITY_UPLOADER_H_
OLDNEW
« no previous file with comments | « components/autofill/core/browser/test_autofill_driver.h ('k') | components/domain_reliability/uploader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698