OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_SERVICE_GAIA_SERVICE_GAIA_AUTHENTICATOR_H_ | 5 #ifndef CHROME_SERVICE_GAIA_SERVICE_GAIA_AUTHENTICATOR_H_ |
6 #define CHROME_SERVICE_GAIA_SERVICE_GAIA_AUTHENTICATOR_H_ | 6 #define CHROME_SERVICE_GAIA_SERVICE_GAIA_AUTHENTICATOR_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 18 matching lines...) Expand all Loading... |
29 const std::string& service_id, | 29 const std::string& service_id, |
30 const std::string& gaia_url, | 30 const std::string& gaia_url, |
31 base::MessageLoopProxy* io_message_loop_proxy); | 31 base::MessageLoopProxy* io_message_loop_proxy); |
32 virtual ~ServiceGaiaAuthenticator(); | 32 virtual ~ServiceGaiaAuthenticator(); |
33 | 33 |
34 // content::URLFetcherDelegate implementation. | 34 // content::URLFetcherDelegate implementation. |
35 virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE; | 35 virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE; |
36 | 36 |
37 protected: | 37 protected: |
38 // GaiaAuthenticator overrides. | 38 // GaiaAuthenticator overrides. |
39 virtual bool Post(const GURL& url, const std::string& post_body, | 39 virtual bool Post(const GURL& url, |
40 unsigned long* response_code, std::string* response_body); | 40 const std::string& post_body, |
41 virtual int GetBackoffDelaySeconds(int current_backoff_delay); | 41 unsigned long* response_code, |
| 42 std::string* response_body) OVERRIDE; |
| 43 virtual int GetBackoffDelaySeconds(int current_backoff_delay) OVERRIDE; |
42 | 44 |
43 private: | 45 private: |
44 void DoPost(const GURL& post_url, const std::string& post_body); | 46 void DoPost(const GURL& post_url, const std::string& post_body); |
45 | 47 |
46 base::WaitableEvent http_post_completed_; | 48 base::WaitableEvent http_post_completed_; |
47 scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_; | 49 scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_; |
48 int http_response_code_; | 50 int http_response_code_; |
49 std::string response_data_; | 51 std::string response_data_; |
50 | 52 |
51 DISALLOW_COPY_AND_ASSIGN(ServiceGaiaAuthenticator); | 53 DISALLOW_COPY_AND_ASSIGN(ServiceGaiaAuthenticator); |
52 }; | 54 }; |
53 | 55 |
54 #endif // CHROME_SERVICE_GAIA_SERVICE_GAIA_AUTHENTICATOR_H_ | 56 #endif // CHROME_SERVICE_GAIA_SERVICE_GAIA_AUTHENTICATOR_H_ |
OLD | NEW |