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

Side by Side Diff: remoting/base/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/rsa_key_pair.cc ('k') | remoting/base/url_request_context_getter.h » ('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_URL_REQUEST_H_ 5 #ifndef REMOTING_BASE_URL_REQUEST_H_
6 #define REMOTING_BASE_URL_REQUEST_H_ 6 #define REMOTING_BASE_URL_REQUEST_H_
7 7
8 #include <memory>
8 #include <string> 9 #include <string>
9 10
10 #include "base/callback_forward.h" 11 #include "base/callback_forward.h"
11 #include "base/memory/scoped_ptr.h"
12 12
13 namespace remoting { 13 namespace remoting {
14 14
15 // Abstract interface for URL requests. 15 // Abstract interface for URL requests.
16 class UrlRequest { 16 class UrlRequest {
17 public: 17 public:
18 enum class Type { 18 enum class Type {
19 GET, 19 GET,
20 POST, 20 POST,
21 }; 21 };
(...skipping 30 matching lines...) Expand all
52 52
53 // Sends a request to the server. |on_response_callback| will be called to 53 // Sends a request to the server. |on_response_callback| will be called to
54 // return result of the request. 54 // return result of the request.
55 virtual void Start(const OnResultCallback& on_result_callback) = 0; 55 virtual void Start(const OnResultCallback& on_result_callback) = 0;
56 }; 56 };
57 57
58 // Factory for UrlRequest instances. 58 // Factory for UrlRequest instances.
59 class UrlRequestFactory { 59 class UrlRequestFactory {
60 public: 60 public:
61 virtual ~UrlRequestFactory() {} 61 virtual ~UrlRequestFactory() {}
62 virtual scoped_ptr<UrlRequest> CreateUrlRequest(UrlRequest::Type type, 62 virtual std::unique_ptr<UrlRequest> CreateUrlRequest(
63 const std::string& url) = 0; 63 UrlRequest::Type type,
64 const std::string& url) = 0;
64 }; 65 };
65 66
66 } // namespace remoting 67 } // namespace remoting
67 68
68 #endif // REMOTING_BASE_URL_REQUEST_H_ 69 #endif // REMOTING_BASE_URL_REQUEST_H_
OLDNEW
« no previous file with comments | « remoting/base/rsa_key_pair.cc ('k') | remoting/base/url_request_context_getter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698