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

Side by Side Diff: remoting/base/chromium_url_request.h

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU 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
« no previous file with comments | « remoting/base/buffered_socket_writer_unittest.cc ('k') | remoting/base/chromium_url_request.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 REMOTING_BASE_CHROMIUM_URL_REQUEST_H_ 5 #ifndef REMOTING_BASE_CHROMIUM_URL_REQUEST_H_
6 #define REMOTING_BASE_CHROMIUM_URL_REQUEST_H_ 6 #define REMOTING_BASE_CHROMIUM_URL_REQUEST_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 18 matching lines...) Expand all
29 // UrlRequest interface. 29 // UrlRequest interface.
30 void AddHeader(const std::string& value) override; 30 void AddHeader(const std::string& value) override;
31 void SetPostData(const std::string& content_type, 31 void SetPostData(const std::string& content_type,
32 const std::string& data) override; 32 const std::string& data) override;
33 void Start(const OnResultCallback& on_result_callback) override; 33 void Start(const OnResultCallback& on_result_callback) override;
34 34
35 private: 35 private:
36 // net::URLFetcherDelegate interface. 36 // net::URLFetcherDelegate interface.
37 void OnURLFetchComplete(const net::URLFetcher* url_fetcher) override; 37 void OnURLFetchComplete(const net::URLFetcher* url_fetcher) override;
38 38
39 scoped_ptr<net::URLFetcher> url_fetcher_; 39 std::unique_ptr<net::URLFetcher> url_fetcher_;
40 OnResultCallback on_result_callback_; 40 OnResultCallback on_result_callback_;
41 }; 41 };
42 42
43 class ChromiumUrlRequestFactory : public UrlRequestFactory { 43 class ChromiumUrlRequestFactory : public UrlRequestFactory {
44 public: 44 public:
45 ChromiumUrlRequestFactory( 45 ChromiumUrlRequestFactory(
46 scoped_refptr<net::URLRequestContextGetter> url_context); 46 scoped_refptr<net::URLRequestContextGetter> url_context);
47 ~ChromiumUrlRequestFactory() override; 47 ~ChromiumUrlRequestFactory() override;
48 48
49 // UrlRequestFactory interface. 49 // UrlRequestFactory interface.
50 scoped_ptr<UrlRequest> CreateUrlRequest(UrlRequest::Type type, 50 std::unique_ptr<UrlRequest> CreateUrlRequest(UrlRequest::Type type,
51 const std::string& url) override; 51 const std::string& url) override;
52 52
53 private: 53 private:
54 scoped_refptr<net::URLRequestContextGetter> url_context_; 54 scoped_refptr<net::URLRequestContextGetter> url_context_;
55 }; 55 };
56 56
57 } // namespace remoting 57 } // namespace remoting
58 58
59 #endif // REMOTING_BASE_CHROMIUM_URL_REQUEST_H_ 59 #endif // REMOTING_BASE_CHROMIUM_URL_REQUEST_H_
OLDNEW
« no previous file with comments | « remoting/base/buffered_socket_writer_unittest.cc ('k') | remoting/base/chromium_url_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698