Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/sync/profile_sync_service.h" | 5 #include "chrome/browser/sync/profile_sync_service.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <ostream> | 9 #include <ostream> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 805 | 805 |
| 806 NotifyObservers(); | 806 NotifyObservers(); |
| 807 } | 807 } |
| 808 | 808 |
| 809 void ProfileSyncService::ShowErrorUI() { | 809 void ProfileSyncService::ShowErrorUI() { |
| 810 if (WizardIsVisible()) { | 810 if (WizardIsVisible()) { |
| 811 wizard_.Focus(); | 811 wizard_.Focus(); |
| 812 return; | 812 return; |
| 813 } | 813 } |
| 814 | 814 |
| 815 ShowSyncSetup(SyncSetupWizard::NONFATAL_ERROR); | 815 if (last_auth_error_.state() != AuthError::NONE) |
|
binji
2011/08/11 18:15:39
Will this branch be taken if there is a passphrase
tim (not reviewing)
2011/08/11 18:18:35
Only if there is also an authentication error, in
| |
| 816 ShowLoginDialog(); | |
| 817 else | |
| 818 ShowSyncSetup(SyncSetupWizard::NONFATAL_ERROR); | |
| 816 } | 819 } |
| 817 | 820 |
| 818 void ProfileSyncService::ShowConfigure(bool sync_everything) { | 821 void ProfileSyncService::ShowConfigure(bool sync_everything) { |
| 819 if (WizardIsVisible()) { | 822 if (WizardIsVisible()) { |
| 820 wizard_.Focus(); | 823 wizard_.Focus(); |
| 821 return; | 824 return; |
| 822 } | 825 } |
| 823 | 826 |
| 824 if (sync_everything) | 827 if (sync_everything) |
| 825 ShowSyncSetup(SyncSetupWizard::SYNC_EVERYTHING); | 828 ShowSyncSetup(SyncSetupWizard::SYNC_EVERYTHING); |
| (...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1403 // is initialized, all enabled data types are consistent with one | 1406 // is initialized, all enabled data types are consistent with one |
| 1404 // another, and no unrecoverable error has transpired. | 1407 // another, and no unrecoverable error has transpired. |
| 1405 if (unrecoverable_error_detected_) | 1408 if (unrecoverable_error_detected_) |
| 1406 return false; | 1409 return false; |
| 1407 | 1410 |
| 1408 if (!data_type_manager_.get()) | 1411 if (!data_type_manager_.get()) |
| 1409 return false; | 1412 return false; |
| 1410 | 1413 |
| 1411 return data_type_manager_->state() == DataTypeManager::CONFIGURED; | 1414 return data_type_manager_->state() == DataTypeManager::CONFIGURED; |
| 1412 } | 1415 } |
| OLD | NEW |