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

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

Issue 2106663004: arc: Initial implemetation of Chrome sync for Arc packages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. More refactor. Fix unit_test related to refactor. Created 4 years, 5 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 a601e1d6c107aeb1b19ffe639ed67fe9dfa0fca0..55261be9f29c8da10eff97cbd5eb50c2771f7cb9 100644
--- a/chrome/browser/sync/chrome_sync_client.cc
+++ b/chrome/browser/sync/chrome_sync_client.cc
@@ -102,6 +102,7 @@
#endif
#if defined(OS_CHROMEOS)
+#include "chrome/browser/ui/app_list/arc/arc_package_syncable_service.h"
#include "components/wifi_sync/wifi_credential_syncable_service.h"
#include "components/wifi_sync/wifi_credential_syncable_service_factory.h"
#endif
@@ -412,6 +413,8 @@ ChromeSyncClient::GetSyncableServiceForType(syncer::ModelType type) {
case syncer::WIFI_CREDENTIALS:
return wifi_sync::WifiCredentialSyncableServiceFactory::
GetForBrowserContext(profile_)->AsWeakPtr();
+ case syncer::ARC_PACKAGE:
+ return arc::ArcPackageSyncableService::Get(profile_)->AsWeakPtr();
#endif
default:
// The following datatypes still need to be transitioned to the
@@ -607,6 +610,9 @@ void ChromeSyncClient::RegisterDesktopDataTypes(
sync_service->RegisterDataTypeController(new UIDataTypeController(
ui_thread, error_callback, syncer::WIFI_CREDENTIALS, this));
}
+ // TODO (lgcheng@) Add switch for this.
+ sync_service->RegisterDataTypeController(new UIDataTypeController(
+ ui_thread, error_callback, syncer::ARC_PACKAGE, this));
#endif
}

Powered by Google App Engine
This is Rietveld 408576698