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_ISSUE_RESPONSE_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_ISSUE_RESPONSE_HANDLER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_ISSUE_RESPONSE_HANDLER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_ISSUE_RESPONSE_HANDLER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 19 matching lines...) Expand all Loading... |
30 | 30 |
31 // Overridden from AuthResponseHandler. | 31 // Overridden from AuthResponseHandler. |
32 virtual bool CanHandle(const GURL& url); | 32 virtual bool CanHandle(const GURL& url); |
33 | 33 |
34 // Overridden from AuthResponseHandler. | 34 // Overridden from AuthResponseHandler. |
35 // Takes in a response from IssueAuthToken, formats into an appropriate query | 35 // Takes in a response from IssueAuthToken, formats into an appropriate query |
36 // to sent to TokenAuth, and issues said query. |catcher| will receive | 36 // to sent to TokenAuth, and issues said query. |catcher| will receive |
37 // the response to the fetch. This fetch will follow redirects, which is | 37 // the response to the fetch. This fetch will follow redirects, which is |
38 // necesary to support GAFYD and corp accounts. | 38 // necesary to support GAFYD and corp accounts. |
39 virtual URLFetcher* Handle(const std::string& to_process, | 39 virtual URLFetcher* Handle(const std::string& to_process, |
40 URLFetcher::Delegate* catcher); | 40 content::URLFetcherDelegate* catcher); |
41 | 41 |
42 // exposed for testing | 42 // exposed for testing |
43 std::string token_url() { return token_url_; } | 43 std::string token_url() { return token_url_; } |
44 | 44 |
45 // Builds a TokenAuth URL using the specified authorization token. | 45 // Builds a TokenAuth URL using the specified authorization token. |
46 static std::string BuildTokenAuthUrlWithToken(const std::string& token); | 46 static std::string BuildTokenAuthUrlWithToken(const std::string& token); |
47 | 47 |
48 private: | 48 private: |
49 std::string token_url_; | 49 std::string token_url_; |
50 net::URLRequestContextGetter* getter_; | 50 net::URLRequestContextGetter* getter_; |
51 DISALLOW_COPY_AND_ASSIGN(IssueResponseHandler); | 51 DISALLOW_COPY_AND_ASSIGN(IssueResponseHandler); |
52 }; | 52 }; |
53 | 53 |
54 } // namespace chromeos | 54 } // namespace chromeos |
55 | 55 |
56 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ISSUE_RESPONSE_HANDLER_H_ | 56 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ISSUE_RESPONSE_HANDLER_H_ |
OLD | NEW |