| 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 24 matching lines...) Expand all Loading... |
| 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 URLFetcher::Delegate* 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. |
| 46 static std::string BuildTokenAuthUrlWithToken(const std::string& token); |
| 47 |
| 45 private: | 48 private: |
| 46 std::string token_url_; | 49 std::string token_url_; |
| 47 net::URLRequestContextGetter* getter_; | 50 net::URLRequestContextGetter* getter_; |
| 48 DISALLOW_COPY_AND_ASSIGN(IssueResponseHandler); | 51 DISALLOW_COPY_AND_ASSIGN(IssueResponseHandler); |
| 49 }; | 52 }; |
| 50 | 53 |
| 51 } // namespace chromeos | 54 } // namespace chromeos |
| 52 | 55 |
| 53 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ISSUE_RESPONSE_HANDLER_H_ | 56 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ISSUE_RESPONSE_HANDLER_H_ |
| OLD | NEW |