Index: chrome/service/cloud_print/cloud_print_auth.cc |
diff --git a/chrome/service/cloud_print/cloud_print_auth.cc b/chrome/service/cloud_print/cloud_print_auth.cc |
index ab51c04d5a408893d500fdf63c5a9a806c1e6321..18ce94756c11a06903d39e5982db9930bbc4e483 100644 |
--- a/chrome/service/cloud_print/cloud_print_auth.cc |
+++ b/chrome/service/cloud_print/cloud_print_auth.cc |
@@ -6,6 +6,8 @@ |
#include "base/bind.h" |
#include "base/string_util.h" |
+#include "chrome/common/cloud_print/cloud_print_constants.h" |
+#include "chrome/common/cloud_print/cloud_print_helpers.h" |
#include "chrome/service/cloud_print/cloud_print_consts.h" |
#include "chrome/service/cloud_print/cloud_print_helpers.h" |
msw
2012/11/17 00:22:30
This isn't used any more, please remove.
Chen Yu
2012/11/26 12:07:06
Done.
|
#include "chrome/service/cloud_print/cloud_print_token_store.h" |
@@ -36,7 +38,8 @@ void CloudPrintAuth::AuthenticateWithLsid( |
VLOG(1) << "CP_AUTH: Authenticating with LSID"; |
scoped_refptr<ServiceGaiaAuthenticator> gaia_auth_for_print( |
new ServiceGaiaAuthenticator( |
- kProxyAuthUserAgent, kCloudPrintGaiaServiceId, |
+ cloud_print::kProxyAuthUserAgent, |
msw
2012/11/17 00:22:30
nit: consider putting this file's contents in the
Chen Yu
2012/11/26 12:07:06
Done.
|
+ cloud_print::kCloudPrintGaiaServiceId, |
GaiaUrls::GetInstance()->client_login_url(), |
g_service_process->io_thread()->message_loop_proxy())); |
gaia_auth_for_print->set_message_loop(MessageLoop::current()); |
@@ -66,9 +69,9 @@ void CloudPrintAuth::AuthenticateWithToken( |
// We need to get the credentials of the robot here. |
GURL get_authcode_url = |
- CloudPrintHelpers::GetUrlForGetAuthCode(cloud_print_server_url_, |
- oauth_client_info_.client_id, |
- proxy_id_); |
+ cloud_print::GetUrlForGetAuthCode(cloud_print_server_url_, |
+ oauth_client_info_.client_id, |
+ proxy_id_); |
request_ = new CloudPrintURLFetcher; |
request_->StartGetRequest(get_authcode_url, |
this, |
@@ -161,13 +164,13 @@ CloudPrintURLFetcher::ResponseAction CloudPrintAuth::HandleJSONData( |
} |
std::string auth_code; |
- if (!json_data->GetString(kOAuthCodeValue, &auth_code)) { |
+ if (!json_data->GetString(cloud_print::kOAuthCodeValue, &auth_code)) { |
VLOG(1) << "CP_AUTH: Creating robot account returned invalid json response"; |
client_->OnInvalidCredentials(); |
return CloudPrintURLFetcher::STOP_PROCESSING; |
} |
- json_data->GetString(kXMPPJidValue, &robot_email_); |
+ json_data->GetString(cloud_print::kXMPPJidValue, &robot_email_); |
// Now that we have an auth code we need to get the refresh and access tokens. |
oauth_client_.reset(new gaia::GaiaOAuthClient( |
gaia::kGaiaOAuth2Url, |