diff options
Diffstat (limited to 'chrome/service/cloud_print/cloud_print_proxy.cc')
-rw-r--r-- | chrome/service/cloud_print/cloud_print_proxy.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/chrome/service/cloud_print/cloud_print_proxy.cc b/chrome/service/cloud_print/cloud_print_proxy.cc index a65da81..12eee70 100644 --- a/chrome/service/cloud_print/cloud_print_proxy.cc +++ b/chrome/service/cloud_print/cloud_print_proxy.cc @@ -85,10 +85,10 @@ void CloudPrintProxy::EnableForUser(const std::string& lsid) { DCHECK(backend_.get()); // Read persisted robot credentials because we may decide to reuse it if the // passed in LSID belongs the same user. - std::string robot_refresh_token = - service_prefs_->GetString(prefs::kCloudPrintRobotRefreshToken, ""); + std::string robot_refresh_token = service_prefs_->GetString( + prefs::kCloudPrintRobotRefreshToken, std::string()); std::string robot_email = - service_prefs_->GetString(prefs::kCloudPrintRobotEmail, ""); + service_prefs_->GetString(prefs::kCloudPrintRobotEmail, std::string()); user_email_ = service_prefs_->GetString(prefs::kCloudPrintEmail, user_email_); // If we have been passed in an LSID, we want to use this to authenticate. @@ -104,7 +104,7 @@ void CloudPrintProxy::EnableForUser(const std::string& lsid) { } else { // Finally see if we have persisted user credentials (legacy case). std::string cloud_print_token = - service_prefs_->GetString(prefs::kCloudPrintAuthToken, ""); + service_prefs_->GetString(prefs::kCloudPrintAuthToken, std::string()); DCHECK(!cloud_print_token.empty()); backend_->InitializeWithToken(cloud_print_token); } @@ -124,7 +124,7 @@ void CloudPrintProxy::EnableForUserWithRobot( ShutdownBackend(); std::string proxy_id( - service_prefs_->GetString(prefs::kCloudPrintProxyId, "")); + service_prefs_->GetString(prefs::kCloudPrintProxyId, std::string())); service_prefs_->RemovePref(prefs::kCloudPrintRoot); if (!proxy_id.empty()) { // Keep only proxy id; @@ -204,7 +204,8 @@ void CloudPrintProxy::GetProxyInfo(CloudPrintProxyInfo* info) { // If the Cloud Print service is not enabled, we may need to read the old // value of proxy_id from prefs. if (info->proxy_id.empty()) - info->proxy_id = service_prefs_->GetString(prefs::kCloudPrintProxyId, ""); + info->proxy_id = + service_prefs_->GetString(prefs::kCloudPrintProxyId, std::string()); } void CloudPrintProxy::CheckCloudPrintProxyPolicy() { |