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

Side by Side Diff: remoting/protocol/http_ice_config_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
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_PROTOCOL_HTTP_ICE_CONFIG_REQUEST_H_ 5 #ifndef REMOTING_PROTOCOL_HTTP_ICE_CONFIG_REQUEST_H_
6 #define REMOTING_PROTOCOL_HTTP_ICE_CONFIG_REQUEST_H_ 6 #define REMOTING_PROTOCOL_HTTP_ICE_CONFIG_REQUEST_H_
7 7
8 #include <memory>
9
8 #include "base/callback.h" 10 #include "base/callback.h"
9 #include "base/macros.h" 11 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "remoting/base/url_request.h" 12 #include "remoting/base/url_request.h"
12 #include "remoting/protocol/ice_config_request.h" 13 #include "remoting/protocol/ice_config_request.h"
13 14
14 namespace remoting { 15 namespace remoting {
15 namespace protocol { 16 namespace protocol {
16 17
17 // IceConfigRequest that fetches IceConfig from using HTTP. If the config has 18 // IceConfigRequest that fetches IceConfig from using HTTP. If the config has
18 // been fetched succesfully but some parts couldn't be parsed then the returned 19 // been fetched succesfully but some parts couldn't be parsed then the returned
19 // config contains all entries that were parsed successfully and 20 // config contains all entries that were parsed successfully and
20 // |expiration_time| is set to Now, i.e. the config is considered expired. 21 // |expiration_time| is set to Now, i.e. the config is considered expired.
21 class HttpIceConfigRequest : public IceConfigRequest { 22 class HttpIceConfigRequest : public IceConfigRequest {
22 public: 23 public:
23 HttpIceConfigRequest(UrlRequestFactory* url_request_factory, 24 HttpIceConfigRequest(UrlRequestFactory* url_request_factory,
24 const std::string& url); 25 const std::string& url);
25 ~HttpIceConfigRequest() override; 26 ~HttpIceConfigRequest() override;
26 27
27 // IceConfigRequest interface. 28 // IceConfigRequest interface.
28 void Send(const OnIceConfigCallback& callback) override; 29 void Send(const OnIceConfigCallback& callback) override;
29 30
30 private: 31 private:
31 void OnResponse(const UrlRequest::Result& result); 32 void OnResponse(const UrlRequest::Result& result);
32 33
33 std::string url_; 34 std::string url_;
34 scoped_ptr<UrlRequest> url_request_; 35 std::unique_ptr<UrlRequest> url_request_;
35 OnIceConfigCallback on_ice_config_callback_; 36 OnIceConfigCallback on_ice_config_callback_;
36 37
37 DISALLOW_COPY_AND_ASSIGN(HttpIceConfigRequest); 38 DISALLOW_COPY_AND_ASSIGN(HttpIceConfigRequest);
38 }; 39 };
39 40
40 } // namespace protocol 41 } // namespace protocol
41 } // namespace remoting 42 } // namespace remoting
42 43
43 #endif // REMOTING_PROTOCOL_HTTP_ICE_CONFIG_REQUEST_H_ 44 #endif // REMOTING_PROTOCOL_HTTP_ICE_CONFIG_REQUEST_H_
OLDNEW
« no previous file with comments | « remoting/protocol/host_video_dispatcher.cc ('k') | remoting/protocol/http_ice_config_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698