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_PROFILE_SYNC_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
774 BrowsingDataRemover::Observer* observer); | 774 BrowsingDataRemover::Observer* observer); |
775 void SetClearingBrowseringDataForTesting(base::Callback< | 775 void SetClearingBrowseringDataForTesting(base::Callback< |
776 void(BrowsingDataRemover::Observer*, Profile*, base::Time, base::Time)> | 776 void(BrowsingDataRemover::Observer*, Profile*, base::Time, base::Time)> |
777 c); | 777 c); |
778 | 778 |
779 // Return the base URL of the Sync Server. | 779 // Return the base URL of the Sync Server. |
780 static GURL GetSyncServiceURL(const base::CommandLine& command_line); | 780 static GURL GetSyncServiceURL(const base::CommandLine& command_line); |
781 | 781 |
782 base::Time GetDeviceBackupTimeForTesting() const; | 782 base::Time GetDeviceBackupTimeForTesting() const; |
783 | 783 |
| 784 // This triggers a Directory::SaveChanges() call on the sync thread. |
| 785 // It should be used to persist data to disk when the process might be |
| 786 // killed in the near future. |
| 787 void FlushDirectory() const; |
| 788 |
784 protected: | 789 protected: |
785 // Helper to configure the priority data types. | 790 // Helper to configure the priority data types. |
786 void ConfigurePriorityDataTypes(); | 791 void ConfigurePriorityDataTypes(); |
787 | 792 |
788 // Helper to install and configure a data type manager. | 793 // Helper to install and configure a data type manager. |
789 void ConfigureDataTypeManager(); | 794 void ConfigureDataTypeManager(); |
790 | 795 |
791 // Shuts down the backend sync components. | 796 // Shuts down the backend sync components. |
792 // |reason| dictates if syncing is being disabled or not, and whether | 797 // |reason| dictates if syncing is being disabled or not, and whether |
793 // to claim ownership of sync thread from backend. | 798 // to claim ownership of sync thread from backend. |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1159 BrowsingDataRemover::Observer* browsing_data_remover_observer_; | 1164 BrowsingDataRemover::Observer* browsing_data_remover_observer_; |
1160 | 1165 |
1161 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); | 1166 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); |
1162 }; | 1167 }; |
1163 | 1168 |
1164 bool ShouldShowActionOnUI( | 1169 bool ShouldShowActionOnUI( |
1165 const syncer::SyncProtocolError& error); | 1170 const syncer::SyncProtocolError& error); |
1166 | 1171 |
1167 | 1172 |
1168 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 1173 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
OLD | NEW |