Index: components/sync/driver/sync_service_base.cc |
diff --git a/components/sync/driver/sync_service_base.cc b/components/sync/driver/sync_service_base.cc |
index 39e252c8fb91cc3cc71f1b6d8339f8b3d699c621..a98b3cf25f2027b1b65d9cd7411eff045be95c9b 100644 |
--- a/components/sync/driver/sync_service_base.cc |
+++ b/components/sync/driver/sync_service_base.cc |
@@ -78,6 +78,16 @@ void SyncServiceBase::RemoveObserver(SyncServiceObserver* observer) { |
observers_.RemoveObserver(observer); |
} |
+bool SyncServiceBase::HasObserver(const SyncServiceObserver* observer) const { |
+ DCHECK(thread_checker_.CalledOnValidThread()); |
+ return observers_.HasObserver(observer); |
+} |
+ |
+SigninManagerBase* SyncServiceBase::signin() const { |
+ DCHECK(thread_checker_.CalledOnValidThread()); |
+ return signin_ ? signin_->GetOriginal() : nullptr; |
+} |
+ |
// static |
base::FilePath SyncServiceBase::FormatSyncDataPath( |
const base::FilePath& base_directory) { |
@@ -91,11 +101,6 @@ base::FilePath SyncServiceBase::FormatSharedModelTypeStorePath( |
.Append(base::FilePath(kLevelDBFolderName)); |
} |
-bool SyncServiceBase::HasObserver(const SyncServiceObserver* observer) const { |
- DCHECK(thread_checker_.CalledOnValidThread()); |
- return observers_.HasObserver(observer); |
-} |
- |
void SyncServiceBase::NotifyObservers() { |
for (auto& observer : observers_) { |
observer.OnStateChanged(this); |