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

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

Issue 709683004: components: add wifi_sync component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@submit-1-security-class
Patch Set: update commit message Created 6 years, 1 month 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/profile_sync_components_factory_impl.cc
diff --git a/chrome/browser/sync/profile_sync_components_factory_impl.cc b/chrome/browser/sync/profile_sync_components_factory_impl.cc
index c4b87d9967ae1c1b68c3e5f1e002b9fa92fe988c..275350d05bf06caeef29f336c3edea2b02736983 100644
--- a/chrome/browser/sync/profile_sync_components_factory_impl.cc
+++ b/chrome/browser/sync/profile_sync_components_factory_impl.cc
@@ -59,6 +59,8 @@
#include "components/sync_driver/proxy_data_type_controller.h"
#include "components/sync_driver/shared_change_processor.h"
#include "components/sync_driver/ui_data_type_controller.h"
+#include "components/wifi_sync/wifi_credential_syncable_service.h"
+#include "components/wifi_sync/wifi_credential_syncable_service_factory.h"
#include "content/public/browser/browser_thread.h"
#include "google_apis/gaia/oauth2_token_service_request.h"
#include "net/url_request/url_request_context_getter.h"
@@ -417,6 +419,16 @@ void ProfileSyncComponentsFactoryImpl::RegisterDesktopDataTypes(
this,
profile_));
#endif
+
+ if (command_line_->HasSwitch(switches::kEnableWifiCredentialSync) &&
+ !disabled_types.Has(syncer::WIFI_CREDENTIALS)) {
+ pss->RegisterDataTypeController(
+ new UIDataTypeController(
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI),
+ base::Bind(&ChromeReportUnrecoverableError),
+ syncer::WIFI_CREDENTIALS,
+ this));
+ }
}
DataTypeManager* ProfileSyncComponentsFactoryImpl::CreateDataTypeManager(
@@ -562,6 +574,11 @@ base::WeakPtr<syncer::SyncableService> ProfileSyncComponentsFactoryImpl::
return base::WeakPtr<syncer::SyncableService>();
#endif
}
+#if defined(OS_CHROMEOS)
+ case syncer::WIFI_CREDENTIALS:
+ return wifi_sync::WifiCredentialSyncableServiceFactory::
+ GetForProfile(profile_)->AsWeakPtr();
+#endif
default:
// The following datatypes still need to be transitioned to the
// syncer::SyncableService API:

Powered by Google App Engine
This is Rietveld 408576698