| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_BOOKMARK_CHANGE_PROCESSOR_H_ | 5 #ifndef CHROME_BROWSER_SYNC_GLUE_BOOKMARK_CHANGE_PROCESSOR_H_ |
| 6 #define CHROME_BROWSER_SYNC_GLUE_BOOKMARK_CHANGE_PROCESSOR_H_ | 6 #define CHROME_BROWSER_SYNC_GLUE_BOOKMARK_CHANGE_PROCESSOR_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "chrome/browser/bookmarks/bookmark_model_observer.h" | 11 #include "chrome/browser/bookmarks/bookmark_model_observer.h" |
| 12 #include "chrome/browser/sync/engine/syncapi.h" | |
| 13 #include "chrome/browser/sync/glue/bookmark_model_associator.h" | 12 #include "chrome/browser/sync/glue/bookmark_model_associator.h" |
| 14 #include "chrome/browser/sync/glue/change_processor.h" | 13 #include "chrome/browser/sync/glue/change_processor.h" |
| 15 #include "chrome/browser/sync/glue/sync_backend_host.h" | 14 #include "chrome/browser/sync/glue/sync_backend_host.h" |
| 15 #include "chrome/browser/sync/internal_api/sync_manager.h" |
| 16 #include "chrome/browser/sync/internal_api/write_node.h" |
| 17 #include "chrome/browser/sync/internal_api/write_transaction.h" |
| 16 | 18 |
| 17 namespace browser_sync { | 19 namespace browser_sync { |
| 18 | 20 |
| 19 // This class is responsible for taking changes from the BookmarkModel | 21 // This class is responsible for taking changes from the BookmarkModel |
| 20 // and applying them to the sync_api 'syncable' model, and vice versa. | 22 // and applying them to the sync_api 'syncable' model, and vice versa. |
| 21 // All operations and use of this class are from the UI thread. | 23 // All operations and use of this class are from the UI thread. |
| 22 // This is currently bookmarks specific. | 24 // This is currently bookmarks specific. |
| 23 class BookmarkChangeProcessor : public BookmarkModelObserver, | 25 class BookmarkChangeProcessor : public BookmarkModelObserver, |
| 24 public ChangeProcessor { | 26 public ChangeProcessor { |
| 25 public: | 27 public: |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 | 166 |
| 165 // The two models should be associated according to this ModelAssociator. | 167 // The two models should be associated according to this ModelAssociator. |
| 166 BookmarkModelAssociator* model_associator_; | 168 BookmarkModelAssociator* model_associator_; |
| 167 | 169 |
| 168 DISALLOW_COPY_AND_ASSIGN(BookmarkChangeProcessor); | 170 DISALLOW_COPY_AND_ASSIGN(BookmarkChangeProcessor); |
| 169 }; | 171 }; |
| 170 | 172 |
| 171 } // namespace browser_sync | 173 } // namespace browser_sync |
| 172 | 174 |
| 173 #endif // CHROME_BROWSER_SYNC_GLUE_BOOKMARK_CHANGE_PROCESSOR_H_ | 175 #endif // CHROME_BROWSER_SYNC_GLUE_BOOKMARK_CHANGE_PROCESSOR_H_ |
| OLD | NEW |