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 771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
782 BrowsingDataRemover::Observer* observer); | 782 BrowsingDataRemover::Observer* observer); |
783 void SetClearingBrowseringDataForTesting(base::Callback< | 783 void SetClearingBrowseringDataForTesting(base::Callback< |
784 void(BrowsingDataRemover::Observer*, Profile*, base::Time, base::Time)> | 784 void(BrowsingDataRemover::Observer*, Profile*, base::Time, base::Time)> |
785 c); | 785 c); |
786 | 786 |
787 // Return the base URL of the Sync Server. | 787 // Return the base URL of the Sync Server. |
788 static GURL GetSyncServiceURL(const base::CommandLine& command_line); | 788 static GURL GetSyncServiceURL(const base::CommandLine& command_line); |
789 | 789 |
790 base::Time GetDeviceBackupTimeForTesting() const; | 790 base::Time GetDeviceBackupTimeForTesting() const; |
791 | 791 |
| 792 // This triggers a Directory::SaveChanges() call on the sync thread. |
| 793 // It should be used to persist data to disk when the process might be |
| 794 // killed in the near future. |
| 795 void FlushDirectory() const; |
| 796 |
792 protected: | 797 protected: |
793 // Helper to configure the priority data types. | 798 // Helper to configure the priority data types. |
794 void ConfigurePriorityDataTypes(); | 799 void ConfigurePriorityDataTypes(); |
795 | 800 |
796 // Helper to install and configure a data type manager. | 801 // Helper to install and configure a data type manager. |
797 void ConfigureDataTypeManager(); | 802 void ConfigureDataTypeManager(); |
798 | 803 |
799 // Shuts down the backend sync components. | 804 // Shuts down the backend sync components. |
800 // |reason| dictates if syncing is being disabled or not, and whether | 805 // |reason| dictates if syncing is being disabled or not, and whether |
801 // to claim ownership of sync thread from backend. | 806 // to claim ownership of sync thread from backend. |
(...skipping 357 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 |