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_TYPED_URL_DATA_TYPE_CONTROLLER_H__ | 5 #ifndef CHROME_BROWSER_SYNC_GLUE_TYPED_URL_DATA_TYPE_CONTROLLER_H__ |
6 #define CHROME_BROWSER_SYNC_GLUE_TYPED_URL_DATA_TYPE_CONTROLLER_H__ | 6 #define CHROME_BROWSER_SYNC_GLUE_TYPED_URL_DATA_TYPE_CONTROLLER_H__ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 // A class that manages the startup and shutdown of typed_url sync. | 26 // A class that manages the startup and shutdown of typed_url sync. |
27 class TypedUrlDataTypeController : public NonFrontendDataTypeController { | 27 class TypedUrlDataTypeController : public NonFrontendDataTypeController { |
28 public: | 28 public: |
29 TypedUrlDataTypeController( | 29 TypedUrlDataTypeController( |
30 ProfileSyncComponentsFactory* profile_sync_factory, | 30 ProfileSyncComponentsFactory* profile_sync_factory, |
31 Profile* profile, | 31 Profile* profile, |
32 ProfileSyncService* sync_service); | 32 ProfileSyncService* sync_service); |
33 | 33 |
34 // NonFrontendDataTypeController implementation | 34 // NonFrontendDataTypeController implementation |
35 virtual syncer::ModelType type() const OVERRIDE; | 35 virtual syncer::ModelType type() const override; |
36 virtual syncer::ModelSafeGroup model_safe_group() const OVERRIDE; | 36 virtual syncer::ModelSafeGroup model_safe_group() const override; |
37 virtual bool ReadyForStart() const OVERRIDE; | 37 virtual bool ReadyForStart() const override; |
38 | 38 |
39 // Invoked on the history thread to set our history backend - must be called | 39 // Invoked on the history thread to set our history backend - must be called |
40 // before CreateSyncComponents() is invoked. | 40 // before CreateSyncComponents() is invoked. |
41 void SetBackend(history::HistoryBackend* backend); | 41 void SetBackend(history::HistoryBackend* backend); |
42 | 42 |
43 protected: | 43 protected: |
44 // NonFrontendDataTypeController interface. | 44 // NonFrontendDataTypeController interface. |
45 virtual bool PostTaskOnBackendThread( | 45 virtual bool PostTaskOnBackendThread( |
46 const tracked_objects::Location& from_here, | 46 const tracked_objects::Location& from_here, |
47 const base::Closure& task) OVERRIDE; | 47 const base::Closure& task) override; |
48 virtual ProfileSyncComponentsFactory::SyncComponents CreateSyncComponents() | 48 virtual ProfileSyncComponentsFactory::SyncComponents CreateSyncComponents() |
49 OVERRIDE; | 49 override; |
50 virtual void DisconnectProcessor( | 50 virtual void DisconnectProcessor( |
51 sync_driver::ChangeProcessor* processor) OVERRIDE; | 51 sync_driver::ChangeProcessor* processor) override; |
52 | 52 |
53 private: | 53 private: |
54 virtual ~TypedUrlDataTypeController(); | 54 virtual ~TypedUrlDataTypeController(); |
55 | 55 |
56 void OnSavingBrowserHistoryDisabledChanged(); | 56 void OnSavingBrowserHistoryDisabledChanged(); |
57 | 57 |
58 history::HistoryBackend* backend_; | 58 history::HistoryBackend* backend_; |
59 PrefChangeRegistrar pref_registrar_; | 59 PrefChangeRegistrar pref_registrar_; |
60 | 60 |
61 // Helper object to make sure we don't leave tasks running on the history | 61 // Helper object to make sure we don't leave tasks running on the history |
62 // thread. | 62 // thread. |
63 base::CancelableTaskTracker task_tracker_; | 63 base::CancelableTaskTracker task_tracker_; |
64 | 64 |
65 DISALLOW_COPY_AND_ASSIGN(TypedUrlDataTypeController); | 65 DISALLOW_COPY_AND_ASSIGN(TypedUrlDataTypeController); |
66 }; | 66 }; |
67 | 67 |
68 } // namespace browser_sync | 68 } // namespace browser_sync |
69 | 69 |
70 #endif // CHROME_BROWSER_SYNC_GLUE_TYPED_URL_DATA_TYPE_CONTROLLER_H__ | 70 #endif // CHROME_BROWSER_SYNC_GLUE_TYPED_URL_DATA_TYPE_CONTROLLER_H__ |
OLD | NEW |