| OLD | NEW |
| 1 // Copyright (c) 2011 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_API_SYNCABLE_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_SYNC_API_SYNCABLE_SERVICE_H_ |
| 6 #define CHROME_BROWSER_SYNC_API_SYNCABLE_SERVICE_H_ | 6 #define CHROME_BROWSER_SYNC_API_SYNCABLE_SERVICE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
| 13 #include "chrome/browser/sync/syncable/model_type.h" | |
| 14 #include "chrome/browser/sync/api/sync_change_processor.h" | 13 #include "chrome/browser/sync/api/sync_change_processor.h" |
| 15 #include "chrome/browser/sync/api/sync_data.h" | 14 #include "chrome/browser/sync/api/sync_data.h" |
| 16 #include "chrome/browser/sync/api/sync_error.h" | 15 #include "chrome/browser/sync/api/sync_error.h" |
| 16 #include "sync/syncable/model_type.h" |
| 17 | 17 |
| 18 class SyncData; | 18 class SyncData; |
| 19 | 19 |
| 20 typedef std::vector<SyncData> SyncDataList; | 20 typedef std::vector<SyncData> SyncDataList; |
| 21 | 21 |
| 22 // TODO(zea): remove SupportsWeakPtr in favor of having all SyncableService | 22 // TODO(zea): remove SupportsWeakPtr in favor of having all SyncableService |
| 23 // implementers provide a way of getting a weak pointer to themselves. | 23 // implementers provide a way of getting a weak pointer to themselves. |
| 24 // See crbug.com/100114. | 24 // See crbug.com/100114. |
| 25 class SyncableService : public SyncChangeProcessor, | 25 class SyncableService : public SyncChangeProcessor, |
| 26 public base::SupportsWeakPtr<SyncableService> { | 26 public base::SupportsWeakPtr<SyncableService> { |
| (...skipping 27 matching lines...) Expand all Loading... |
| 54 // otherwise. | 54 // otherwise. |
| 55 virtual SyncError ProcessSyncChanges( | 55 virtual SyncError ProcessSyncChanges( |
| 56 const tracked_objects::Location& from_here, | 56 const tracked_objects::Location& from_here, |
| 57 const SyncChangeList& change_list) OVERRIDE = 0; | 57 const SyncChangeList& change_list) OVERRIDE = 0; |
| 58 | 58 |
| 59 protected: | 59 protected: |
| 60 virtual ~SyncableService(); | 60 virtual ~SyncableService(); |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 #endif // CHROME_BROWSER_SYNC_API_SYNCABLE_SERVICE_H_ | 63 #endif // CHROME_BROWSER_SYNC_API_SYNCABLE_SERVICE_H_ |
| OLD | NEW |