| 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 <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 515 } | 515 } |
| 516 } | 516 } |
| 517 | 517 |
| 518 if (HasSyncSetupCompleted()) { | 518 if (HasSyncSetupCompleted()) { |
| 519 ConfigureDataTypeManager(); | 519 ConfigureDataTypeManager(); |
| 520 } | 520 } |
| 521 } | 521 } |
| 522 | 522 |
| 523 void ProfileSyncService::OnSyncCycleCompleted() { | 523 void ProfileSyncService::OnSyncCycleCompleted() { |
| 524 UpdateLastSyncedTime(); | 524 UpdateLastSyncedTime(); |
| 525 VLOG(2) << "Notifying observers sync cycle completed"; |
| 525 NotifyObservers(); | 526 NotifyObservers(); |
| 526 } | 527 } |
| 527 | 528 |
| 528 void ProfileSyncService::UpdateAuthErrorState( | 529 void ProfileSyncService::UpdateAuthErrorState( |
| 529 const GoogleServiceAuthError& error) { | 530 const GoogleServiceAuthError& error) { |
| 530 last_auth_error_ = error; | 531 last_auth_error_ = error; |
| 531 // Protect against the in-your-face dialogs that pop out of nowhere. | 532 // Protect against the in-your-face dialogs that pop out of nowhere. |
| 532 // Require the user to click somewhere to run the setup wizard in the case | 533 // Require the user to click somewhere to run the setup wizard in the case |
| 533 // of a steady-state auth failure. | 534 // of a steady-state auth failure. |
| 534 if (WizardIsVisible()) { | 535 if (WizardIsVisible()) { |
| (...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1259 // is initialized, all enabled data types are consistent with one | 1260 // is initialized, all enabled data types are consistent with one |
| 1260 // another, and no unrecoverable error has transpired. | 1261 // another, and no unrecoverable error has transpired. |
| 1261 if (unrecoverable_error_detected_) | 1262 if (unrecoverable_error_detected_) |
| 1262 return false; | 1263 return false; |
| 1263 | 1264 |
| 1264 if (!data_type_manager_.get()) | 1265 if (!data_type_manager_.get()) |
| 1265 return false; | 1266 return false; |
| 1266 | 1267 |
| 1267 return data_type_manager_->state() == DataTypeManager::CONFIGURED; | 1268 return data_type_manager_->state() == DataTypeManager::CONFIGURED; |
| 1268 } | 1269 } |
| OLD | NEW |