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