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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 // PrivetHTTPClient implementation. | 246 // PrivetHTTPClient implementation. |
247 const std::string& GetName() override; | 247 const std::string& GetName() override; |
248 scoped_ptr<PrivetJSONOperation> CreateInfoOperation( | 248 scoped_ptr<PrivetJSONOperation> CreateInfoOperation( |
249 const PrivetJSONOperation::ResultCallback& callback) override; | 249 const PrivetJSONOperation::ResultCallback& callback) override; |
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(uint16_t port) override; |
257 uint16_t port, | |
258 const net::SHA256HashValue& certificate_fingerprint) override; | |
259 bool IsInHttpsMode() const override; | 257 bool IsInHttpsMode() const override; |
260 std::string GetHost() const override; | 258 std::string GetHost() const override; |
261 | 259 |
262 private: | 260 private: |
263 typedef std::vector<PrivetURLFetcher::TokenCallback> TokenCallbackVector; | 261 typedef std::vector<PrivetURLFetcher::TokenCallback> TokenCallbackVector; |
264 | 262 |
265 void OnPrivetInfoDone(const base::DictionaryValue* value); | 263 void OnPrivetInfoDone(const base::DictionaryValue* value); |
266 | 264 |
267 std::string name_; | 265 std::string name_; |
268 scoped_refptr<net::URLRequestContextGetter> context_getter_; | 266 scoped_refptr<net::URLRequestContextGetter> context_getter_; |
(...skipping 25 matching lines...) Expand all Loading... |
294 private: | 292 private: |
295 PrivetHTTPClient* info_client() { return info_client_.get(); } | 293 PrivetHTTPClient* info_client() { return info_client_.get(); } |
296 | 294 |
297 scoped_ptr<PrivetHTTPClient> info_client_; | 295 scoped_ptr<PrivetHTTPClient> info_client_; |
298 | 296 |
299 DISALLOW_COPY_AND_ASSIGN(PrivetV1HTTPClientImpl); | 297 DISALLOW_COPY_AND_ASSIGN(PrivetV1HTTPClientImpl); |
300 }; | 298 }; |
301 | 299 |
302 } // namespace local_discovery | 300 } // namespace local_discovery |
303 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_IMPL_H_ | 301 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_IMPL_H_ |
OLD | NEW |