Chromium Code Reviews| 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; |