| 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 "build/build_config.h" | 5 #include "build/build_config.h" |
| 6 | 6 |
| 7 #include "chrome/browser/sync/glue/sync_backend_host.h" | 7 #include "chrome/browser/sync/glue/sync_backend_host.h" |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 } | 336 } |
| 337 | 337 |
| 338 const GoogleServiceAuthError& SyncBackendHost::GetAuthError() const { | 338 const GoogleServiceAuthError& SyncBackendHost::GetAuthError() const { |
| 339 return last_auth_error_; | 339 return last_auth_error_; |
| 340 } | 340 } |
| 341 | 341 |
| 342 const SyncSessionSnapshot* SyncBackendHost::GetLastSessionSnapshot() const { | 342 const SyncSessionSnapshot* SyncBackendHost::GetLastSessionSnapshot() const { |
| 343 return last_snapshot_.get(); | 343 return last_snapshot_.get(); |
| 344 } | 344 } |
| 345 | 345 |
| 346 string16 SyncBackendHost::GetAuthenticatedUsername() const { | |
| 347 DCHECK(initialized()); | |
| 348 return UTF8ToUTF16(core_->sync_manager()->GetAuthenticatedUsername()); | |
| 349 } | |
| 350 | |
| 351 bool SyncBackendHost::HasUnsyncedItems() const { | 346 bool SyncBackendHost::HasUnsyncedItems() const { |
| 352 DCHECK(initialized()); | 347 DCHECK(initialized()); |
| 353 return core_->sync_manager()->HasUnsyncedItems(); | 348 return core_->sync_manager()->HasUnsyncedItems(); |
| 354 } | 349 } |
| 355 | 350 |
| 356 bool SyncBackendHost::IsNigoriEnabled() const { | 351 bool SyncBackendHost::IsNigoriEnabled() const { |
| 357 return registrar_.get() && registrar_->IsNigoriEnabled(); | 352 return registrar_.get() && registrar_->IsNigoriEnabled(); |
| 358 } | 353 } |
| 359 | 354 |
| 360 bool SyncBackendHost::IsUsingExplicitPassphrase() { | 355 bool SyncBackendHost::IsUsingExplicitPassphrase() { |
| (...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1064 FROM_HERE, | 1059 FROM_HERE, |
| 1065 base::Bind(&SyncBackendHost::Core::DoRefreshEncryption, | 1060 base::Bind(&SyncBackendHost::Core::DoRefreshEncryption, |
| 1066 core_.get(), sync_thread_done_callback)); | 1061 core_.get(), sync_thread_done_callback)); |
| 1067 } | 1062 } |
| 1068 | 1063 |
| 1069 #undef SVLOG | 1064 #undef SVLOG |
| 1070 | 1065 |
| 1071 #undef SLOG | 1066 #undef SLOG |
| 1072 | 1067 |
| 1073 } // namespace browser_sync | 1068 } // namespace browser_sync |
| OLD | NEW |