OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_HISTORY_TYPED_URL_SYNCABLE_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_HISTORY_TYPED_URL_SYNCABLE_SERVICE_H_ |
6 #define CHROME_BROWSER_HISTORY_TYPED_URL_SYNCABLE_SERVICE_H_ | 6 #define CHROME_BROWSER_HISTORY_TYPED_URL_SYNCABLE_SERVICE_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 29 matching lines...) Expand all Loading... |
40 explicit TypedUrlSyncableService(HistoryBackend* history_backend); | 40 explicit TypedUrlSyncableService(HistoryBackend* history_backend); |
41 virtual ~TypedUrlSyncableService(); | 41 virtual ~TypedUrlSyncableService(); |
42 | 42 |
43 static syncer::ModelType model_type() { return syncer::TYPED_URLS; } | 43 static syncer::ModelType model_type() { return syncer::TYPED_URLS; } |
44 | 44 |
45 // syncer::SyncableService implementation. | 45 // syncer::SyncableService implementation. |
46 virtual syncer::SyncMergeResult MergeDataAndStartSyncing( | 46 virtual syncer::SyncMergeResult MergeDataAndStartSyncing( |
47 syncer::ModelType type, | 47 syncer::ModelType type, |
48 const syncer::SyncDataList& initial_sync_data, | 48 const syncer::SyncDataList& initial_sync_data, |
49 scoped_ptr<syncer::SyncChangeProcessor> sync_processor, | 49 scoped_ptr<syncer::SyncChangeProcessor> sync_processor, |
50 scoped_ptr<syncer::SyncErrorFactory> error_handler) OVERRIDE; | 50 scoped_ptr<syncer::SyncErrorFactory> error_handler) override; |
51 virtual void StopSyncing(syncer::ModelType type) OVERRIDE; | 51 virtual void StopSyncing(syncer::ModelType type) override; |
52 virtual syncer::SyncDataList GetAllSyncData( | 52 virtual syncer::SyncDataList GetAllSyncData( |
53 syncer::ModelType type) const OVERRIDE; | 53 syncer::ModelType type) const override; |
54 virtual syncer::SyncError ProcessSyncChanges( | 54 virtual syncer::SyncError ProcessSyncChanges( |
55 const tracked_objects::Location& from_here, | 55 const tracked_objects::Location& from_here, |
56 const syncer::SyncChangeList& change_list) OVERRIDE; | 56 const syncer::SyncChangeList& change_list) override; |
57 | 57 |
58 // Called directly by HistoryBackend when local url data changes. | 58 // Called directly by HistoryBackend when local url data changes. |
59 void OnUrlsModified(URLRows* changed_urls); | 59 void OnUrlsModified(URLRows* changed_urls); |
60 void OnUrlVisited(ui::PageTransition transition, URLRow* row); | 60 void OnUrlVisited(ui::PageTransition transition, URLRow* row); |
61 void OnUrlsDeleted(bool all_history, bool expired, URLRows* rows); | 61 void OnUrlsDeleted(bool all_history, bool expired, URLRows* rows); |
62 | 62 |
63 protected: | 63 protected: |
64 void GetSyncedUrls(std::set<GURL>* urls) { | 64 void GetSyncedUrls(std::set<GURL>* urls) { |
65 urls->insert(synced_typed_urls_.begin(), synced_typed_urls_.end()); | 65 urls->insert(synced_typed_urls_.begin(), synced_typed_urls_.end()); |
66 } | 66 } |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 MaxVisitLocalTypedUrlAndSync); | 155 MaxVisitLocalTypedUrlAndSync); |
156 FRIEND_TEST_ALL_PREFIXES(TypedUrlSyncableServiceTest, | 156 FRIEND_TEST_ALL_PREFIXES(TypedUrlSyncableServiceTest, |
157 ThrottleVisitLocalTypedUrlSync); | 157 ThrottleVisitLocalTypedUrlSync); |
158 | 158 |
159 DISALLOW_COPY_AND_ASSIGN(TypedUrlSyncableService); | 159 DISALLOW_COPY_AND_ASSIGN(TypedUrlSyncableService); |
160 }; | 160 }; |
161 | 161 |
162 } // namespace history | 162 } // namespace history |
163 | 163 |
164 #endif // CHROME_BROWSER_HISTORY_TYPED_URL_SYNCABLE_SERVICE_H_ | 164 #endif // CHROME_BROWSER_HISTORY_TYPED_URL_SYNCABLE_SERVICE_H_ |
OLD | NEW |