| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/sync/one_click_signin_sync_starter.h" | 5 #include "chrome/browser/ui/sync/one_click_signin_sync_starter.h" |
| 6 | 6 |
| 7 #include "base/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
| 8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
| 9 #include "chrome/browser/signin/signin_manager.h" | 9 #include "chrome/browser/signin/signin_manager.h" |
| 10 #include "chrome/browser/signin/signin_manager_factory.h" | 10 #include "chrome/browser/signin/signin_manager_factory.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 | 47 |
| 48 void OneClickSigninSyncStarter::SigninSuccess() { | 48 void OneClickSigninSyncStarter::SigninSuccess() { |
| 49 ProfileSyncService* profile_sync_service = | 49 ProfileSyncService* profile_sync_service = |
| 50 ProfileSyncServiceFactory::GetForProfile(profile_); | 50 ProfileSyncServiceFactory::GetForProfile(profile_); |
| 51 | 51 |
| 52 if (use_default_settings_) { | 52 if (use_default_settings_) { |
| 53 // Just kick off the sync machine, no need to configure it first. | 53 // Just kick off the sync machine, no need to configure it first. |
| 54 profile_sync_service->SetSyncSetupCompleted(); | 54 profile_sync_service->SetSyncSetupCompleted(); |
| 55 profile_sync_service->UnsuppressAndStart(); | 55 profile_sync_service->UnsuppressAndStart(); |
| 56 } else { | 56 } else { |
| 57 #if !defined(OS_ANDROID) |
| 58 // Android uses native UI for sync setup. |
| 57 // Give the user a chance to configure things. | 59 // Give the user a chance to configure things. |
| 58 LoginUIServiceFactory::GetForProfile(profile_)->ShowLoginUI(false); | 60 LoginUIServiceFactory::GetForProfile(profile_)->ShowLoginUI(false); |
| 61 #endif |
| 59 } | 62 } |
| 60 | 63 |
| 61 delete this; | 64 delete this; |
| 62 } | 65 } |
| OLD | NEW |