OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_SYNC_GLUE_SHARED_CHANGE_PROCESSOR_REF_H_ |
| 6 #define CHROME_BROWSER_SYNC_GLUE_SHARED_CHANGE_PROCESSOR_REF_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/ref_counted.h" |
| 11 #include "chrome/browser/sync/api/sync_change_processor.h" |
| 12 #include "chrome/browser/sync/glue/shared_change_processor.h" |
| 13 |
| 14 namespace browser_sync { |
| 15 |
| 16 // A SyncChangeProcessor stub for interacting with a refcounted |
| 17 // SharedChangeProcessor. |
| 18 class SharedChangeProcessorRef : public SyncChangeProcessor { |
| 19 public: |
| 20 SharedChangeProcessorRef( |
| 21 const scoped_refptr<browser_sync::SharedChangeProcessor>& |
| 22 change_processor); |
| 23 virtual ~SharedChangeProcessorRef(); |
| 24 |
| 25 // SyncChangeProcessor implementation. |
| 26 virtual SyncError ProcessSyncChanges( |
| 27 const tracked_objects::Location& from_here, |
| 28 const SyncChangeList& change_list) OVERRIDE; |
| 29 |
| 30 // Default copy and assign welcome (and safe due to refcounted-ness). |
| 31 |
| 32 private: |
| 33 scoped_refptr<browser_sync::SharedChangeProcessor> change_processor_; |
| 34 }; |
| 35 |
| 36 } // namespace browser_sync |
| 37 |
| 38 #endif // CHROME_BROWSER_SYNC_GLUE_SHARED_CHANGE_PROCESSOR_REF_H_ |
OLD | NEW |