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_BROWSER_CHROMEOS_LOGIN_CLIENT_LOGIN_RESPONSE_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_CLIENT_LOGIN_RESPONSE_HANDLER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_CLIENT_LOGIN_RESPONSE_HANDLER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_CLIENT_LOGIN_RESPONSE_HANDLER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 17 matching lines...) Expand all Loading... |
28 virtual ~ClientLoginResponseHandler() {} | 28 virtual ~ClientLoginResponseHandler() {} |
29 | 29 |
30 // Overridden from AuthResponseHandler. | 30 // Overridden from AuthResponseHandler. |
31 virtual bool CanHandle(const GURL& url); | 31 virtual bool CanHandle(const GURL& url); |
32 | 32 |
33 // Overridden from AuthResponseHandler. | 33 // Overridden from AuthResponseHandler. |
34 // Takes in a response from ClientLogin, formats into an appropriate query | 34 // Takes in a response from ClientLogin, formats into an appropriate query |
35 // to sent to IssueAuthToken and issues said query. |catcher| will receive | 35 // to sent to IssueAuthToken and issues said query. |catcher| will receive |
36 // the response to the fetch. | 36 // the response to the fetch. |
37 virtual URLFetcher* Handle(const std::string& to_process, | 37 virtual URLFetcher* Handle(const std::string& to_process, |
38 URLFetcher::Delegate* catcher); | 38 content::URLFetcherDelegate* catcher); |
39 | 39 |
40 // exposed for tests. | 40 // exposed for tests. |
41 std::string payload() { return payload_; } | 41 std::string payload() { return payload_; } |
42 | 42 |
43 // A string that tells the Accounts backend to which service we're trying to | 43 // A string that tells the Accounts backend to which service we're trying to |
44 // authenticate. | 44 // authenticate. |
45 static const char kService[]; | 45 static const char kService[]; |
46 private: | 46 private: |
47 std::string payload_; | 47 std::string payload_; |
48 net::URLRequestContextGetter* getter_; | 48 net::URLRequestContextGetter* getter_; |
49 | 49 |
50 DISALLOW_COPY_AND_ASSIGN(ClientLoginResponseHandler); | 50 DISALLOW_COPY_AND_ASSIGN(ClientLoginResponseHandler); |
51 }; | 51 }; |
52 | 52 |
53 } // namespace chromeos | 53 } // namespace chromeos |
54 | 54 |
55 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_CLIENT_LOGIN_RESPONSE_HANDLER_H_ | 55 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_CLIENT_LOGIN_RESPONSE_HANDLER_H_ |
OLD | NEW |