Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(316)

Unified Diff: chrome/browser/sync/sync_setup_flow.cc

Issue 8665011: sync: remove GetAuthenticatedUsername from ProfileSyncService/SyncBackendHost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/sync_setup_flow.cc
diff --git a/chrome/browser/sync/sync_setup_flow.cc b/chrome/browser/sync/sync_setup_flow.cc
index fb5e4c3929ab7dd6576fc75daf764ae583a16b1f..e15bf7360d9584f31c80f1324162308a69b24223 100644
--- a/chrome/browser/sync/sync_setup_flow.cc
+++ b/chrome/browser/sync/sync_setup_flow.cc
@@ -103,10 +103,8 @@ void SyncSetupFlow::GetArgsForGaiaLogin(const ProfileSyncService* service,
args->SetBoolean("editable_user", true);
} else {
string16 user;
- if (!service->cros_user().empty())
- user = UTF8ToUTF16(service->cros_user());
- else
- user = service->GetAuthenticatedUsername();
+ user = UTF8ToUTF16(service->profile()->GetPrefs()->GetString(
+ prefs::kGoogleServicesUsername));
Andrew T Wilson (Slow) 2011/11/24 01:48:16 I'm slightly nervous about this, as it's not 100%
tim (not reviewing) 2011/11/24 03:59:42 But in that case the username has to stay the same
Andrew T Wilson (Slow) 2011/11/24 17:14:08 OK, if you're saying the user always has the optio
args->SetString("user", user);
args->SetInteger("error", 0);
args->SetBoolean("editable_user", user.empty());
@@ -496,7 +494,9 @@ void SyncSetupFlow::ActivateState(SyncSetupWizard::State state) {
}
case SyncSetupWizard::DONE:
case SyncSetupWizard::ABORT:
- flow_handler_->ShowSetupDone(service_->GetAuthenticatedUsername());
+ flow_handler_->ShowSetupDone(UTF8ToUTF16(
+ service_->profile()->GetPrefs()->GetString(
+ prefs::kGoogleServicesUsername)));
break;
default:
NOTREACHED() << "Invalid advance state: " << state;

Powered by Google App Engine
This is Rietveld 408576698