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

Unified Diff: components/sync/driver/sync_service_base.cc

Issue 2898723003: [Sync] Migrate SyncInternalsMessageHandler off CallJavascriptFunctionUnsafe. (Closed)
Patch Set: More updates for dbeam. Created 3 years, 7 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/sync/driver/sync_service_base.h ('k') | components/sync/engine/events/protocol_event.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « components/sync/driver/sync_service_base.h ('k') | components/sync/engine/events/protocol_event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698