OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_CLIENT_IOS_FACADE_HOST_LIST_FETCHER_H_ | 5 #ifndef REMOTING_IOS_FACADE_HOST_LIST_FETCHER_H_ |
6 #define REMOTING_CLIENT_IOS_FACADE_HOST_LIST_FETCHER_H_ | 6 #define REMOTING_IOS_FACADE_HOST_LIST_FETCHER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/callback.h" | 12 #include "base/callback.h" |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
15 #include "net/url_request/url_fetcher_delegate.h" | 15 #include "net/url_request/url_fetcher_delegate.h" |
16 #include "net/url_request/url_request_context_getter.h" | 16 #include "net/url_request/url_request_context_getter.h" |
17 #include "remoting/client/ios/facade/host_info.h" | 17 #include "remoting/ios/facade/host_info.h" |
18 | 18 |
19 namespace remoting { | 19 namespace remoting { |
20 | 20 |
21 // Used by the HostlistFetcher to make HTTP requests and also by the | 21 // Used by the HostlistFetcher to make HTTP requests and also by the |
22 // unittests for this class to set fake response data for these URLs. | 22 // unittests for this class to set fake response data for these URLs. |
23 // TODO(nicholss): Consider moving this to an extern and conditionally include | 23 // TODO(nicholss): Consider moving this to an extern and conditionally include |
24 // prod or test environment urls based on config. A test env app would be nice. | 24 // prod or test environment urls based on config. A test env app would be nice. |
25 const char kHostListProdRequestUrl[] = | 25 const char kHostListProdRequestUrl[] = |
26 "https://www.googleapis.com/chromoting/v1/@me/hosts"; | 26 "https://www.googleapis.com/chromoting/v1/@me/hosts"; |
27 | 27 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 std::unique_ptr<net::URLFetcher> request_; | 59 std::unique_ptr<net::URLFetcher> request_; |
60 | 60 |
61 // Caller-supplied callback used to return hostlist on success. | 61 // Caller-supplied callback used to return hostlist on success. |
62 HostlistCallback hostlist_callback_; | 62 HostlistCallback hostlist_callback_; |
63 | 63 |
64 DISALLOW_COPY_AND_ASSIGN(HostListFetcher); | 64 DISALLOW_COPY_AND_ASSIGN(HostListFetcher); |
65 }; | 65 }; |
66 | 66 |
67 } // namespace remoting | 67 } // namespace remoting |
68 | 68 |
69 #endif // REMOTING_CLIENT_IOS_FACADE_HOST_LIST_FETCHER_H_ | 69 #endif // REMOTING_IOS_FACADE_HOST_LIST_FETCHER_H_ |
OLD | NEW |