Chromium Code Reviews| Index: chrome/browser/ui/sync/one_click_signin_sync_starter.cc |
| diff --git a/chrome/browser/ui/sync/one_click_signin_sync_starter.cc b/chrome/browser/ui/sync/one_click_signin_sync_starter.cc |
| index dc1b99838f723cee569fc91ca919e0446c5ea41f..cd8673a658486c0f57a1f2461fed55a46d516d81 100644 |
| --- a/chrome/browser/ui/sync/one_click_signin_sync_starter.cc |
| +++ b/chrome/browser/ui/sync/one_click_signin_sync_starter.cc |
| @@ -299,15 +299,17 @@ void OneClickSigninSyncStarter::SigninSuccess() { |
| switch (start_mode_) { |
| case SYNC_WITH_DEFAULT_SETTINGS: |
| if (profile_sync_service) { |
| - // Just kick off the sync machine, no need to configure it first. |
| - profile_sync_service->OnUserChoseDatatypes(true, |
| - syncer::ModelTypeSet()); |
| - profile_sync_service->SetSyncSetupCompleted(); |
| + if (!profile_sync_service->IsManaged()) { |
|
Andrew T Wilson (Slow)
2013/05/24 15:13:10
If you move IsManaged() into IsSyncAccessible(), t
pavely
2013/05/24 22:17:11
I need pointer to PSS to call SetSetupInProgress(f
|
| + // Just kick off the sync machine, no need to configure it first. |
| + profile_sync_service->OnUserChoseDatatypes(true, |
| + syncer::ModelTypeSet()); |
| + profile_sync_service->SetSyncSetupCompleted(); |
| + } |
| profile_sync_service->SetSetupInProgress(false); |
| } |
| if (confirmation_required_ == CONFIRM_AFTER_SIGNIN) { |
| string16 message; |
| - if (!profile_sync_service) { |
| + if (!profile_sync_service || profile_sync_service->IsManaged()) { |
| // Sync is disabled by policy. |
| message = l10n_util::GetStringUTF16( |
| IDS_ONE_CLICK_SIGNIN_BUBBLE_SYNC_DISABLED_MESSAGE); |
| @@ -360,7 +362,7 @@ void OneClickSigninSyncStarter::ConfigureSync() { |
| login_ui->current_login_ui()->FocusUI(); |
| } else { |
| EnsureBrowser(); |
| - if (profile_sync_service) { |
| + if (profile_sync_service && !profile_sync_service->IsManaged()) { |
| // Need to navigate to the settings page and display the sync UI. |
| if (force_same_tab_navigation_) { |
| ShowSyncSettingsPageOnSameTab(); |