Chromium Code Reviews| 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 // ShareedChangeProcessor. | |
| 18 class SharedChangeProcessorRef : public SyncChangeProcessor { | |
| 19 public: | |
| 20 SharedChangeProcessorRef( | |
| 21 browser_sync::SharedChangeProcessor* change_processor); | |
|
akalin
2011/10/07 20:51:16
take a const ref to a scoped_refptr<>
Nicolas Zea
2011/10/07 22:05:52
Done.
| |
| 22 virtual ~SharedChangeProcessorRef(); | |
| 23 | |
| 24 // SyncChangeProcessor implementation. | |
| 25 virtual SyncError ProcessSyncChanges( | |
| 26 const tracked_objects::Location& from_here, | |
| 27 const SyncChangeList& change_list) OVERRIDE; | |
| 28 | |
| 29 // Default copy and assign welcome (and safe due to refcounted-ness). | |
| 30 | |
| 31 private: | |
| 32 scoped_refptr<browser_sync::SharedChangeProcessor> change_processor_; | |
| 33 }; | |
| 34 | |
| 35 } // namespace browser_sync | |
| 36 | |
| 37 #endif // CHROME_BROWSER_SYNC_GLUE_SHARED_CHANGE_PROCESSOR_REF_H_ | |
| OLD | NEW |