| 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_CHANGE_PROCESSOR_H_ | 5 #ifndef CHROME_BROWSER_SYNC_GLUE_TYPED_URL_CHANGE_PROCESSOR_H_ |
| 6 #define CHROME_BROWSER_SYNC_GLUE_TYPED_URL_CHANGE_PROCESSOR_H_ | 6 #define CHROME_BROWSER_SYNC_GLUE_TYPED_URL_CHANGE_PROCESSOR_H_ |
| 7 | 7 |
| 8 #include "components/sync_driver/change_processor.h" | 8 #include "components/sync_driver/change_processor.h" |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 TypedUrlChangeProcessor(Profile* profile, | 48 TypedUrlChangeProcessor(Profile* profile, |
| 49 TypedUrlModelAssociator* model_associator, | 49 TypedUrlModelAssociator* model_associator, |
| 50 history::HistoryBackend* history_backend, | 50 history::HistoryBackend* history_backend, |
| 51 sync_driver::DataTypeErrorHandler* error_handler); | 51 sync_driver::DataTypeErrorHandler* error_handler); |
| 52 virtual ~TypedUrlChangeProcessor(); | 52 virtual ~TypedUrlChangeProcessor(); |
| 53 | 53 |
| 54 // content::NotificationObserver implementation. | 54 // content::NotificationObserver implementation. |
| 55 // History -> sync API change application. | 55 // History -> sync API change application. |
| 56 virtual void Observe(int type, | 56 virtual void Observe(int type, |
| 57 const content::NotificationSource& source, | 57 const content::NotificationSource& source, |
| 58 const content::NotificationDetails& details) OVERRIDE; | 58 const content::NotificationDetails& details) override; |
| 59 | 59 |
| 60 // sync API model -> WebDataService change application. | 60 // sync API model -> WebDataService change application. |
| 61 virtual void ApplyChangesFromSyncModel( | 61 virtual void ApplyChangesFromSyncModel( |
| 62 const syncer::BaseTransaction* trans, | 62 const syncer::BaseTransaction* trans, |
| 63 int64 model_version, | 63 int64 model_version, |
| 64 const syncer::ImmutableChangeRecordList& changes) OVERRIDE; | 64 const syncer::ImmutableChangeRecordList& changes) override; |
| 65 | 65 |
| 66 // Commit changes here, after we've released the transaction lock to avoid | 66 // Commit changes here, after we've released the transaction lock to avoid |
| 67 // jank. | 67 // jank. |
| 68 virtual void CommitChangesFromSyncModel() OVERRIDE; | 68 virtual void CommitChangesFromSyncModel() override; |
| 69 | 69 |
| 70 // Stop processing changes and wait for being destroyed. | 70 // Stop processing changes and wait for being destroyed. |
| 71 void Disconnect(); | 71 void Disconnect(); |
| 72 | 72 |
| 73 protected: | 73 protected: |
| 74 virtual void StartImpl() OVERRIDE; | 74 virtual void StartImpl() override; |
| 75 | 75 |
| 76 private: | 76 private: |
| 77 friend class ScopedStopObserving<TypedUrlChangeProcessor>; | 77 friend class ScopedStopObserving<TypedUrlChangeProcessor>; |
| 78 void StartObserving(); | 78 void StartObserving(); |
| 79 void StopObserving(); | 79 void StopObserving(); |
| 80 | 80 |
| 81 void HandleURLsModified(history::URLsModifiedDetails* details); | 81 void HandleURLsModified(history::URLsModifiedDetails* details); |
| 82 void HandleURLsDeleted(history::URLsDeletedDetails* details); | 82 void HandleURLsDeleted(history::URLsDeletedDetails* details); |
| 83 void HandleURLsVisited(history::URLVisitedDetails* details); | 83 void HandleURLsVisited(history::URLVisitedDetails* details); |
| 84 | 84 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 | 120 |
| 121 bool disconnected_; | 121 bool disconnected_; |
| 122 base::Lock disconnect_lock_; | 122 base::Lock disconnect_lock_; |
| 123 | 123 |
| 124 DISALLOW_COPY_AND_ASSIGN(TypedUrlChangeProcessor); | 124 DISALLOW_COPY_AND_ASSIGN(TypedUrlChangeProcessor); |
| 125 }; | 125 }; |
| 126 | 126 |
| 127 } // namespace browser_sync | 127 } // namespace browser_sync |
| 128 | 128 |
| 129 #endif // CHROME_BROWSER_SYNC_GLUE_TYPED_URL_CHANGE_PROCESSOR_H_ | 129 #endif // CHROME_BROWSER_SYNC_GLUE_TYPED_URL_CHANGE_PROCESSOR_H_ |
| OLD | NEW |