Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(313)

Side by Side Diff: chrome/browser/sync/profile_sync_service.h

Issue 551843003: Persist Directory to disk when the app is backgrounded. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a test and use SyncBackendHostCore::SaveChanges(). Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698