| 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/sync/profile_sync_service.h" | 5 #include "chrome/browser/sync/profile_sync_service.h" |
| 6 | 6 |
| 7 #include <cstddef> | 7 #include <cstddef> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 983 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 994 } | 994 } |
| 995 | 995 |
| 996 const GoogleServiceAuthError& ProfileSyncService::GetAuthError() const { | 996 const GoogleServiceAuthError& ProfileSyncService::GetAuthError() const { |
| 997 return last_auth_error_; | 997 return last_auth_error_; |
| 998 } | 998 } |
| 999 | 999 |
| 1000 bool ProfileSyncService::FirstSetupInProgress() const { | 1000 bool ProfileSyncService::FirstSetupInProgress() const { |
| 1001 return !HasSyncSetupCompleted() && setup_in_progress_; | 1001 return !HasSyncSetupCompleted() && setup_in_progress_; |
| 1002 } | 1002 } |
| 1003 | 1003 |
| 1004 void ProfileSyncService::SetSetupInProgress(bool setup_in_progress) { |
| 1005 setup_in_progress_ = setup_in_progress; |
| 1006 if (!setup_in_progress) { |
| 1007 if (sync_initialized()) { |
| 1008 ReconfigureDatatypeManager(); |
| 1009 } |
| 1010 } |
| 1011 } |
| 1012 |
| 1004 bool ProfileSyncService::sync_initialized() const { | 1013 bool ProfileSyncService::sync_initialized() const { |
| 1005 return backend_initialized_; | 1014 return backend_initialized_; |
| 1006 } | 1015 } |
| 1007 | 1016 |
| 1008 bool ProfileSyncService::waiting_for_auth() const { | 1017 bool ProfileSyncService::waiting_for_auth() const { |
| 1009 return is_auth_in_progress_; | 1018 return is_auth_in_progress_; |
| 1010 } | 1019 } |
| 1011 | 1020 |
| 1012 bool ProfileSyncService::unrecoverable_error_detected() const { | 1021 bool ProfileSyncService::unrecoverable_error_detected() const { |
| 1013 return unrecoverable_error_detected_; | 1022 return unrecoverable_error_detected_; |
| (...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1664 // See http://stackoverflow.com/questions/6224121/is-new-this-myclass-undefine
d-behaviour-after-directly-calling-the-destru. | 1673 // See http://stackoverflow.com/questions/6224121/is-new-this-myclass-undefine
d-behaviour-after-directly-calling-the-destru. |
| 1665 ProfileSyncService* old_this = this; | 1674 ProfileSyncService* old_this = this; |
| 1666 this->~ProfileSyncService(); | 1675 this->~ProfileSyncService(); |
| 1667 new(old_this) ProfileSyncService( | 1676 new(old_this) ProfileSyncService( |
| 1668 new ProfileSyncComponentsFactoryImpl(profile, | 1677 new ProfileSyncComponentsFactoryImpl(profile, |
| 1669 CommandLine::ForCurrentProcess()), | 1678 CommandLine::ForCurrentProcess()), |
| 1670 profile, | 1679 profile, |
| 1671 signin, | 1680 signin, |
| 1672 behavior); | 1681 behavior); |
| 1673 } | 1682 } |
| OLD | NEW |