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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
61 ProfileSyncServiceFactory::GetForProfile(browser_->profile()); | 61 ProfileSyncServiceFactory::GetForProfile(browser_->profile()); |
62 profile_sync_service->SetSetupInProgress(false); | 62 profile_sync_service->SetSetupInProgress(false); |
63 delete this; | 63 delete this; |
64 } | 64 } |
65 | 65 |
66 void OneClickSigninSyncStarter::SigninSuccess() { | 66 void OneClickSigninSyncStarter::SigninSuccess() { |
67 ProfileSyncService* profile_sync_service = | 67 ProfileSyncService* profile_sync_service = |
68 ProfileSyncServiceFactory::GetForProfile(browser_->profile()); | 68 ProfileSyncServiceFactory::GetForProfile(browser_->profile()); |
69 | 69 |
70 if (start_mode_ == SYNC_WITH_DEFAULT_SETTINGS) { | 70 if (start_mode_ == SYNC_WITH_DEFAULT_SETTINGS) { |
71 // Just kick off the sync machine, no need to configure it first. | 71 // Just kick off the sync machine, no need to configure it first. |
tim (not reviewing)
2012/10/22 19:38:46
nit - comment needs update next time you're in the
| |
72 profile_sync_service->OnUserChoseDatatypes(true, syncer::ModelTypeSet()); | |
72 profile_sync_service->SetSyncSetupCompleted(); | 73 profile_sync_service->SetSyncSetupCompleted(); |
73 profile_sync_service->SetSetupInProgress(false); | 74 profile_sync_service->SetSetupInProgress(false); |
74 } else { | 75 } else { |
75 // Give the user a chance to configure things. We don't clear the | 76 // Give the user a chance to configure things. We don't clear the |
76 // ProfileSyncService::setup_in_progress flag because we don't want sync | 77 // ProfileSyncService::setup_in_progress flag because we don't want sync |
77 // to start up until after the configure UI is displayed (the configure UI | 78 // to start up until after the configure UI is displayed (the configure UI |
78 // will clear the flag when the user is done setting up sync). | 79 // will clear the flag when the user is done setting up sync). |
79 LoginUIServiceFactory::GetForProfile(browser_->profile())->ShowLoginUI( | 80 LoginUIServiceFactory::GetForProfile(browser_->profile())->ShowLoginUI( |
80 browser_); | 81 browser_); |
81 } | 82 } |
82 | 83 |
83 delete this; | 84 delete this; |
84 } | 85 } |
OLD | NEW |