| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_SYNC_GLUE_TYPED_URL_MODEL_ASSOCIATOR_H_ | 5 #ifndef CHROME_BROWSER_SYNC_GLUE_TYPED_URL_MODEL_ASSOCIATOR_H_ |
| 6 #define CHROME_BROWSER_SYNC_GLUE_TYPED_URL_MODEL_ASSOCIATOR_H_ | 6 #define CHROME_BROWSER_SYNC_GLUE_TYPED_URL_MODEL_ASSOCIATOR_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 TypedUrlModelAssociator(ProfileSyncService* sync_service, | 51 TypedUrlModelAssociator(ProfileSyncService* sync_service, |
| 52 history::HistoryBackend* history_backend, | 52 history::HistoryBackend* history_backend, |
| 53 sync_driver::DataTypeErrorHandler* error_handler); | 53 sync_driver::DataTypeErrorHandler* error_handler); |
| 54 virtual ~TypedUrlModelAssociator(); | 54 virtual ~TypedUrlModelAssociator(); |
| 55 | 55 |
| 56 // AssociatorInterface implementation. | 56 // AssociatorInterface implementation. |
| 57 // | 57 // |
| 58 // Iterates through the sync model looking for matched pairs of items. | 58 // Iterates through the sync model looking for matched pairs of items. |
| 59 virtual syncer::SyncError AssociateModels( | 59 virtual syncer::SyncError AssociateModels( |
| 60 syncer::SyncMergeResult* local_merge_result, | 60 syncer::SyncMergeResult* local_merge_result, |
| 61 syncer::SyncMergeResult* syncer_merge_result) OVERRIDE; | 61 syncer::SyncMergeResult* syncer_merge_result) override; |
| 62 | 62 |
| 63 // Clears all associations. | 63 // Clears all associations. |
| 64 virtual syncer::SyncError DisassociateModels() OVERRIDE; | 64 virtual syncer::SyncError DisassociateModels() override; |
| 65 | 65 |
| 66 // Called from the main thread, to abort the currently active model | 66 // Called from the main thread, to abort the currently active model |
| 67 // association (for example, if we are shutting down). | 67 // association (for example, if we are shutting down). |
| 68 virtual void AbortAssociation() OVERRIDE; | 68 virtual void AbortAssociation() override; |
| 69 | 69 |
| 70 // The has_nodes out param is true if the sync model has nodes other | 70 // The has_nodes out param is true if the sync model has nodes other |
| 71 // than the permanent tagged nodes. | 71 // than the permanent tagged nodes. |
| 72 virtual bool SyncModelHasUserCreatedNodes(bool* has_nodes) OVERRIDE; | 72 virtual bool SyncModelHasUserCreatedNodes(bool* has_nodes) override; |
| 73 | 73 |
| 74 virtual bool CryptoReadyIfNecessary() OVERRIDE; | 74 virtual bool CryptoReadyIfNecessary() override; |
| 75 | 75 |
| 76 // Delete all typed url nodes. | 76 // Delete all typed url nodes. |
| 77 bool DeleteAllNodes(syncer::WriteTransaction* trans); | 77 bool DeleteAllNodes(syncer::WriteTransaction* trans); |
| 78 | 78 |
| 79 void WriteToHistoryBackend(const history::URLRows* new_urls, | 79 void WriteToHistoryBackend(const history::URLRows* new_urls, |
| 80 const history::URLRows* updated_urls, | 80 const history::URLRows* updated_urls, |
| 81 const TypedUrlVisitVector* new_visits, | 81 const TypedUrlVisitVector* new_visits, |
| 82 const history::VisitVector* deleted_visits); | 82 const history::VisitVector* deleted_visits); |
| 83 | 83 |
| 84 // Given a typed URL in the sync DB, looks for an existing entry in the | 84 // Given a typed URL in the sync DB, looks for an existing entry in the |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 // fail for each client via UMA. | 195 // fail for each client via UMA. |
| 196 int num_db_accesses_; | 196 int num_db_accesses_; |
| 197 int num_db_errors_; | 197 int num_db_errors_; |
| 198 | 198 |
| 199 DISALLOW_COPY_AND_ASSIGN(TypedUrlModelAssociator); | 199 DISALLOW_COPY_AND_ASSIGN(TypedUrlModelAssociator); |
| 200 }; | 200 }; |
| 201 | 201 |
| 202 } // namespace browser_sync | 202 } // namespace browser_sync |
| 203 | 203 |
| 204 #endif // CHROME_BROWSER_SYNC_GLUE_TYPED_URL_MODEL_ASSOCIATOR_H_ | 204 #endif // CHROME_BROWSER_SYNC_GLUE_TYPED_URL_MODEL_ASSOCIATOR_H_ |
| OLD | NEW |