OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 COMPONENTS_SYNC_DRIVER_SYNC_SERVICE_BASE_H_ | 5 #ifndef COMPONENTS_SYNC_DRIVER_SYNC_SERVICE_BASE_H_ |
6 #define COMPONENTS_SYNC_DRIVER_SYNC_SERVICE_BASE_H_ | 6 #define COMPONENTS_SYNC_DRIVER_SYNC_SERVICE_BASE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 // email address. | 69 // email address. |
70 const std::unique_ptr<SigninManagerWrapper> signin_; | 70 const std::unique_ptr<SigninManagerWrapper> signin_; |
71 | 71 |
72 // The product channel of the embedder. | 72 // The product channel of the embedder. |
73 const version_info::Channel channel_; | 73 const version_info::Channel channel_; |
74 | 74 |
75 // The path to the base directory under which sync should store its | 75 // The path to the base directory under which sync should store its |
76 // information. | 76 // information. |
77 const base::FilePath base_directory_; | 77 const base::FilePath base_directory_; |
78 | 78 |
79 // The full path to the sync data directory. | 79 // The full path to the sync data folder. The folder is not fully deleted when |
80 const base::FilePath directory_path_; | 80 // sync is disabled, since it holds both Directory and ModelTypeStore data. |
| 81 // Directory files will be selectively targeted instead. |
| 82 const base::FilePath sync_data_folder_; |
81 | 83 |
82 // An identifier representing this instance for debugging purposes. | 84 // An identifier representing this instance for debugging purposes. |
83 const std::string debug_identifier_; | 85 const std::string debug_identifier_; |
84 | 86 |
85 // The class that handles getting, setting, and persisting sync | 87 // The class that handles getting, setting, and persisting sync |
86 // preferences. | 88 // preferences. |
87 SyncPrefs sync_prefs_; | 89 SyncPrefs sync_prefs_; |
88 | 90 |
89 // The thread where all the sync operations happen. This thread is kept alive | 91 // The thread where all the sync operations happen. This thread is kept alive |
90 // until browser shutdown and reused if sync is turned off and on again. It is | 92 // until browser shutdown and reused if sync is turned off and on again. It is |
91 // joined during the shutdown process, but there is an abort mechanism in | 93 // joined during the shutdown process, but there is an abort mechanism in |
92 // place to prevent slow HTTP requests from blocking browser shutdown. | 94 // place to prevent slow HTTP requests from blocking browser shutdown. |
93 std::unique_ptr<base::Thread> sync_thread_; | 95 std::unique_ptr<base::Thread> sync_thread_; |
94 | 96 |
95 // Our asynchronous engine to communicate with sync components living on | 97 // Our asynchronous engine to communicate with sync components living on |
96 // other threads. | 98 // other threads. |
97 std::unique_ptr<SyncEngine> engine_; | 99 std::unique_ptr<SyncEngine> engine_; |
98 | 100 |
99 private: | 101 private: |
100 bool GetLocalSyncConfig(base::FilePath* local_sync_backend_folder) const; | 102 bool GetLocalSyncConfig(base::FilePath* local_sync_backend_folder) const; |
101 | 103 |
102 DISALLOW_COPY_AND_ASSIGN(SyncServiceBase); | 104 DISALLOW_COPY_AND_ASSIGN(SyncServiceBase); |
103 }; | 105 }; |
104 | 106 |
105 } // namespace syncer | 107 } // namespace syncer |
106 | 108 |
107 #endif // COMPONENTS_SYNC_DRIVER_SYNC_SERVICE_BASE_H_ | 109 #endif // COMPONENTS_SYNC_DRIVER_SYNC_SERVICE_BASE_H_ |
OLD | NEW |