OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_IMPL_H_ | 5 #ifndef CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_IMPL_H_ |
6 #define CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_IMPL_H_ | 6 #define CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_IMPL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 scoped_ptr<PrivetURLFetcher> CreateURLFetcher( | 250 scoped_ptr<PrivetURLFetcher> CreateURLFetcher( |
251 const GURL& url, | 251 const GURL& url, |
252 net::URLFetcher::RequestType request_type, | 252 net::URLFetcher::RequestType request_type, |
253 PrivetURLFetcher::Delegate* delegate) override; | 253 PrivetURLFetcher::Delegate* delegate) override; |
254 void RefreshPrivetToken( | 254 void RefreshPrivetToken( |
255 const PrivetURLFetcher::TokenCallback& token_callback) override; | 255 const PrivetURLFetcher::TokenCallback& token_callback) override; |
256 void SwitchToHttps( | 256 void SwitchToHttps( |
257 uint16_t port, | 257 uint16_t port, |
258 const net::SHA256HashValue& certificate_fingerprint) override; | 258 const net::SHA256HashValue& certificate_fingerprint) override; |
259 bool IsInHttpsMode() const override; | 259 bool IsInHttpsMode() const override; |
| 260 std::string GetHost() const override; |
260 | 261 |
261 private: | 262 private: |
262 typedef std::vector<PrivetURLFetcher::TokenCallback> TokenCallbackVector; | 263 typedef std::vector<PrivetURLFetcher::TokenCallback> TokenCallbackVector; |
263 | 264 |
264 void OnPrivetInfoDone(const base::DictionaryValue* value); | 265 void OnPrivetInfoDone(const base::DictionaryValue* value); |
265 | 266 |
266 std::string name_; | 267 std::string name_; |
267 scoped_refptr<net::URLRequestContextGetter> context_getter_; | 268 scoped_refptr<net::URLRequestContextGetter> context_getter_; |
268 bool use_https_ = false; | 269 bool use_https_ = false; |
269 net::HostPortPair host_port_; | 270 net::HostPortPair host_port_; |
(...skipping 23 matching lines...) Expand all Loading... |
293 private: | 294 private: |
294 PrivetHTTPClient* info_client() { return info_client_.get(); } | 295 PrivetHTTPClient* info_client() { return info_client_.get(); } |
295 | 296 |
296 scoped_ptr<PrivetHTTPClient> info_client_; | 297 scoped_ptr<PrivetHTTPClient> info_client_; |
297 | 298 |
298 DISALLOW_COPY_AND_ASSIGN(PrivetV1HTTPClientImpl); | 299 DISALLOW_COPY_AND_ASSIGN(PrivetV1HTTPClientImpl); |
299 }; | 300 }; |
300 | 301 |
301 } // namespace local_discovery | 302 } // namespace local_discovery |
302 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_IMPL_H_ | 303 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_IMPL_H_ |
OLD | NEW |