Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(193)

Side by Side Diff: chrome/browser/sync/glue/sync_backend_host.cc

Issue 8665011: sync: remove GetAuthenticatedUsername from ProfileSyncService/SyncBackendHost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review2 Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 720 matching lines...) Expand 10 before | Expand all | Expand 10 after
1081 FROM_HERE, 1076 FROM_HERE,
1082 base::Bind(&SyncBackendHost::Core::DoRefreshEncryption, 1077 base::Bind(&SyncBackendHost::Core::DoRefreshEncryption,
1083 core_.get(), sync_thread_done_callback)); 1078 core_.get(), sync_thread_done_callback));
1084 } 1079 }
1085 1080
1086 #undef SVLOG 1081 #undef SVLOG
1087 1082
1088 #undef SLOG 1083 #undef SLOG
1089 1084
1090 } // namespace browser_sync 1085 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/sync_backend_host.h ('k') | chrome/browser/sync/internal_api/sync_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698