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_NEW_NON_FRONTEND_DATA_TYPE_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_SYNC_GLUE_NEW_NON_FRONTEND_DATA_TYPE_CONTROLLER_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "base/compiler_specific.h" |
| 10 #include "chrome/browser/sync/glue/non_frontend_data_type_controller.h" |
| 11 #include "chrome/browser/sync/glue/shared_change_processor.h" |
| 12 #include "chrome/browser/sync/util/weak_handle.h" |
| 13 |
| 14 class SyncableService; |
| 15 |
| 16 namespace sync_api { |
| 17 struct UserShare; |
| 18 } |
| 19 |
| 20 namespace browser_sync { |
| 21 |
| 22 class NewNonFrontendDataTypeController : public NonFrontendDataTypeController { |
| 23 public: |
| 24 NewNonFrontendDataTypeController( |
| 25 ProfileSyncFactory* profile_sync_factory, |
| 26 Profile* profile); |
| 27 virtual ~NewNonFrontendDataTypeController(); |
| 28 |
| 29 virtual void Start(StartCallback* start_callback) OVERRIDE; |
| 30 virtual void Stop() OVERRIDE; |
| 31 |
| 32 protected: |
| 33 NewNonFrontendDataTypeController(); |
| 34 |
| 35 // Override's of NonFrontendDataTypeController methods. |
| 36 virtual void StartAssociation() OVERRIDE; |
| 37 virtual void StartDone(DataTypeController::StartResult result, |
| 38 DataTypeController::State new_state, |
| 39 const SyncError& error) OVERRIDE; |
| 40 |
| 41 // Extract/create the syncable service from the profile and return a |
| 42 // WeakHandle to it. |
| 43 virtual WeakHandle<SyncableService> GetWeakHandleToSyncableService() |
| 44 const = 0; |
| 45 |
| 46 private: |
| 47 // Deprecated. |
| 48 virtual bool StopAssociationAsync() OVERRIDE; |
| 49 virtual void CreateSyncComponents() OVERRIDE; |
| 50 |
| 51 sync_api::UserShare* user_share_; |
| 52 |
| 53 // A weak handle to the actual local syncable service, which performs all the |
| 54 // real work. We do not own the object. |
| 55 WeakHandle<SyncableService> local_service_; |
| 56 |
| 57 scoped_refptr<SharedChangeProcessor> shared_change_processor_; |
| 58 }; |
| 59 |
| 60 } // namespace browser_sync |
| 61 |
| 62 #endif // CHROME_BROWSER_SYNC_GLUE_NEW_NON_FRONTEND_DATA_TYPE_CONTROLLER_H_ |
OLD | NEW |