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 1707223002: Implement HttpIceConfigRequest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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/protocol/BUILD.gn ('k') | remoting/protocol/http_ice_config_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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef REMOTING_PROTOCOL_HTTP_ICE_CONFIG_REQUEST_H_
6 #define REMOTING_PROTOCOL_HTTP_ICE_CONFIG_REQUEST_H_
7
8 #include "base/callback.h"
9 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "remoting/base/url_request.h"
12 #include "remoting/protocol/ice_config_request.h"
13
14 namespace remoting {
15 namespace protocol {
16
17 // 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 // config contains all entries that were parsed successfully and
20 // |expiration_time| is set to Now, i.e. the config is considered expired.
21 class HttpIceConfigRequest : public IceConfigRequest {
22 public:
23 HttpIceConfigRequest(UrlRequestFactory* url_request_factory,
24 const std::string& url);
25 ~HttpIceConfigRequest() override;
26
27 // IceConfigRequest interface.
28 void Send(const OnIceConfigCallback& callback) override;
29
30 private:
31 void OnResponse(const UrlRequest::Result& result);
32
33 std::string url_;
34 scoped_ptr<UrlRequest> url_request_;
35 OnIceConfigCallback on_ice_config_callback_;
36
37 DISALLOW_COPY_AND_ASSIGN(HttpIceConfigRequest);
38 };
39
40 } // namespace protocol
41 } // namespace remoting
42
43 #endif // REMOTING_PROTOCOL_HTTP_ICE_CONFIG_REQUEST_H_
OLDNEW
« no previous file with comments | « remoting/protocol/BUILD.gn ('k') | remoting/protocol/http_ice_config_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698