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

Unified Diff: chrome/browser/sync/chrome_sync_client.cc

Issue 1422773004: [sync] Abstract most ProfileSyncService //chrome deps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pss_chrome_signin_deps
Patch Set: Fix deps Created 5 years, 2 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
Index: chrome/browser/sync/chrome_sync_client.cc
diff --git a/chrome/browser/sync/chrome_sync_client.cc b/chrome/browser/sync/chrome_sync_client.cc
index f9f87d3c546b0828daa815e59d22428325c0c573..7d011e25abc98ac35545452a8e40115517e1184d 100644
--- a/chrome/browser/sync/chrome_sync_client.cc
+++ b/chrome/browser/sync/chrome_sync_client.cc
@@ -11,6 +11,7 @@
#include "chrome/browser/dom_distiller/dom_distiller_service_factory.h"
#include "chrome/browser/favicon/favicon_service_factory.h"
#include "chrome/browser/history/history_service_factory.h"
+#include "chrome/browser/invalidation/profile_invalidation_provider_factory.h"
#include "chrome/browser/password_manager/password_store_factory.h"
#include "chrome/browser/prefs/pref_service_syncable_util.h"
#include "chrome/browser/profiles/profile.h"
@@ -25,6 +26,7 @@
#include "chrome/browser/ui/sync/browser_synced_window_delegates_getter.h"
#include "chrome/browser/undo/bookmark_undo_service_factory.h"
#include "chrome/browser/web_data_service_factory.h"
+#include "chrome/common/channel_info.h"
#include "chrome/common/url_constants.h"
#include "components/autofill/core/browser/webdata/autocomplete_syncable_service.h"
#include "components/autofill/core/browser/webdata/autofill_profile_syncable_service.h"
@@ -34,6 +36,7 @@
#include "components/dom_distiller/core/dom_distiller_service.h"
#include "components/history/core/browser/history_model_worker.h"
#include "components/history/core/browser/history_service.h"
+#include "components/invalidation/impl/profile_invalidation_provider.h"
#include "components/password_manager/core/browser/password_store.h"
#include "components/password_manager/sync/browser/password_model_worker.h"
#include "components/sync_driver/glue/browser_thread_model_worker.h"
@@ -218,6 +221,14 @@ BookmarkUndoService* ChromeSyncClient::GetBookmarkUndoServiceIfExists() {
return BookmarkUndoServiceFactory::GetForProfileIfExists(profile_);
}
+invalidation::InvalidationService* ChromeSyncClient::GetInvalidationService() {
+ invalidation::ProfileInvalidationProvider* provider =
+ invalidation::ProfileInvalidationProviderFactory::GetForProfile(profile_);
+ if (provider)
+ return provider->GetInvalidationService();
+ return nullptr;
+}
+
scoped_refptr<syncer::ExtensionsActivity>
ChromeSyncClient::GetExtensionsActivity() {
return extensions_activity_monitor_.GetExtensionsActivity();
@@ -398,6 +409,18 @@ ChromeSyncClient::GetSyncApiComponentFactory() {
return component_factory_.get();
}
+base::FilePath ChromeSyncClient::GetBaseDirectory() {
+ return profile_->GetPath();
+}
+
+net::URLRequestContextGetter* ChromeSyncClient::GetURLRequestContext() {
+ return profile_->GetRequestContext();
+}
+
+std::string ChromeSyncClient::GetDebugIdentifier() {
+ return profile_->GetDebugName();
+}
+
void ChromeSyncClient::ClearBrowsingData(base::Time start, base::Time end) {
// BrowsingDataRemover deletes itself when it's done.
BrowsingDataRemover* remover =
@@ -417,4 +440,20 @@ void ChromeSyncClient::SetBrowsingDataRemoverObserverForTesting(
browsing_data_remover_observer_ = observer;
}
+version_info::Channel ChromeSyncClient::GetChannel() {
+ return chrome::GetChannel();
+}
+
+scoped_refptr<base::SingleThreadTaskRunner> ChromeSyncClient::GetDBThread() {
+ return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB);
+}
+
+scoped_refptr<base::SingleThreadTaskRunner> ChromeSyncClient::GetFileThread() {
+ return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE);
+}
+
+base::SequencedWorkerPool* ChromeSyncClient::GetBlockingPool() {
+ return BrowserThread::GetBlockingPool();
+}
+
} // namespace browser_sync

Powered by Google App Engine
This is Rietveld 408576698