OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "chrome/browser/chromeos/login/client_login_response_handler.h" | 5 #include "chrome/browser/chromeos/login/client_login_response_handler.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "chrome/browser/chromeos/login/google_authenticator.h" | 10 #include "chrome/browser/chromeos/login/google_authenticator.h" |
11 #include "chrome/browser/net/chrome_url_request_context.h" | 11 #include "chrome/browser/net/chrome_url_request_context.h" |
12 #include "chrome/common/net/url_fetcher.h" | 12 #include "content/common/url_fetcher.h" |
13 #include "net/base/load_flags.h" | 13 #include "net/base/load_flags.h" |
14 | 14 |
15 namespace chromeos { | 15 namespace chromeos { |
16 | 16 |
17 // By setting "service=gaia", we get an uber-auth-token back. | 17 // By setting "service=gaia", we get an uber-auth-token back. |
18 const char ClientLoginResponseHandler::kService[] = "service=gaia"; | 18 const char ClientLoginResponseHandler::kService[] = "service=gaia"; |
19 | 19 |
20 // Overridden from AuthResponseHandler. | 20 // Overridden from AuthResponseHandler. |
21 bool ClientLoginResponseHandler::CanHandle(const GURL& url) { | 21 bool ClientLoginResponseHandler::CanHandle(const GURL& url) { |
22 return (url.spec().find(AuthResponseHandler::kClientLoginUrl) != | 22 return (url.spec().find(AuthResponseHandler::kClientLoginUrl) != |
(...skipping 17 matching lines...) Expand all Loading... |
40 fetcher->set_upload_data("application/x-www-form-urlencoded", payload_); | 40 fetcher->set_upload_data("application/x-www-form-urlencoded", payload_); |
41 if (getter_) { | 41 if (getter_) { |
42 VLOG(1) << "Fetching " << AuthResponseHandler::kIssueAuthTokenUrl; | 42 VLOG(1) << "Fetching " << AuthResponseHandler::kIssueAuthTokenUrl; |
43 fetcher->set_request_context(getter_); | 43 fetcher->set_request_context(getter_); |
44 fetcher->Start(); | 44 fetcher->Start(); |
45 } | 45 } |
46 return fetcher; | 46 return fetcher; |
47 } | 47 } |
48 | 48 |
49 } // namespace chromeos | 49 } // namespace chromeos |
OLD | NEW |