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

Unified Diff: ios/chrome/browser/sync/ios_chrome_sync_client.mm

Issue 2723953002: [sync] skeleton implementation of TypedURLSyncBridge (Closed)
Patch Set: Created 3 years, 10 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: ios/chrome/browser/sync/ios_chrome_sync_client.mm
diff --git a/ios/chrome/browser/sync/ios_chrome_sync_client.mm b/ios/chrome/browser/sync/ios_chrome_sync_client.mm
index 8d7d4a566576ad89405ed7eabfc4f9b9fea8d4bf..ff396b5a1abca03e06ea149700f91d2bd1243969 100644
--- a/ios/chrome/browser/sync/ios_chrome_sync_client.mm
+++ b/ios/chrome/browser/sync/ios_chrome_sync_client.mm
@@ -23,6 +23,8 @@
#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/history/core/browser/typed_url_sync_bridge.h"
+#include "components/history/core/browser/typed_url_syncable_service.h"
#include "components/invalidation/impl/profile_invalidation_provider.h"
#include "components/keyed_service/core/service_access_type.h"
#include "components/password_manager/core/browser/password_store.h"
@@ -353,6 +355,13 @@ IOSChromeSyncClient::GetSyncBridgeForModelType(syncer::ModelType type) {
return autofill::AutocompleteSyncBridge::FromWebDataService(
web_data_service_.get())
->AsWeakPtr();
+ case syncer::TYPED_URLS: {
+ history::HistoryService* history =
+ ios::HistoryServiceFactory::GetForBrowserState(
+ browser_state_, ServiceAccessType::EXPLICIT_ACCESS);
+ return history ? history->GetTypedURLSyncBridge()->AsWeakPtr()
+ : base::WeakPtr<syncer::ModelTypeSyncBridge>();
+ }
default:
NOTREACHED();
return base::WeakPtr<syncer::ModelTypeSyncBridge>();

Powered by Google App Engine
This is Rietveld 408576698