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

Unified Diff: components/history/core/browser/history_backend.h

Issue 2723953002: [sync] skeleton implementation of TypedURLSyncBridge (Closed)
Patch Set: rebase and address missing parts for bug 558320 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: components/history/core/browser/history_backend.h
diff --git a/components/history/core/browser/history_backend.h b/components/history/core/browser/history_backend.h
index 2a62a79deccf02c0276c3ab2b043e86708491a9f..07950b4fee0d291f495e0ab9a3f5a1ca85376008 100644
--- a/components/history/core/browser/history_backend.h
+++ b/components/history/core/browser/history_backend.h
@@ -53,6 +53,7 @@ struct HistoryDatabaseParams;
class HistoryDBTask;
class InMemoryHistoryBackend;
class TypedUrlSyncableService;
+class TypedURLSyncBridge;
class HistoryBackendHelper;
class URLDatabase;
@@ -395,6 +396,10 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>,
// is owned by |this| object.
virtual TypedUrlSyncableService* GetTypedUrlSyncableService() const;
+ // Returns the sync bridge for syncing typed urls. The returned service
+ // is owned by |this| object.
+ TypedURLSyncBridge* GetTypedURLSyncBridge() const;
+
// Deleting ------------------------------------------------------------------
virtual void DeleteURLs(const std::vector<GURL>& urls);
@@ -886,10 +891,12 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>,
// List of observers
base::ObserverList<HistoryBackendObserver> observers_;
- // Used to manage syncing of the typed urls datatype. This will be null before
- // Init is called. Defined after observers_ because it unregisters itself as
- // observer during destruction.
+ // Used to manage syncing of the typed urls datatype. They will be null before
+ // Init is called, and only one will be instantiated after Init is called
+ // depending on switches::kSyncUSSTypedURL. Defined after observers_ because
+ // it unregisters itself as observer during destruction.
skym 2017/03/07 18:08:04 Can you add a small TODO to the bridge to make sur
Gang Wu 2017/03/31 19:35:58 Done.
std::unique_ptr<TypedUrlSyncableService> typed_url_syncable_service_;
+ std::unique_ptr<TypedURLSyncBridge> typed_url_sync_bridge_;
DISALLOW_COPY_AND_ASSIGN(HistoryBackend);
};

Powered by Google App Engine
This is Rietveld 408576698