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

Unified Diff: chrome/browser/prefs/chrome_pref_service_factory.cc

Issue 324493002: Move preference MACs to the protected preference stores. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Pull some stuff from Persistent to WriteablePrefStore. Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/prefs/chrome_pref_service_factory.cc
diff --git a/chrome/browser/prefs/chrome_pref_service_factory.cc b/chrome/browser/prefs/chrome_pref_service_factory.cc
index d0ea85b3ddcd5aa8d4675d683c0810b64f1be4c9..bbc27e2406d8a32da9d2bab73eb27b1537cea5db 100644
--- a/chrome/browser/prefs/chrome_pref_service_factory.cc
+++ b/chrome/browser/prefs/chrome_pref_service_factory.cc
@@ -393,25 +393,6 @@ void PrepareFactory(
factory->set_user_prefs(user_pref_store);
}
-// Initialize/update preference hash stores for all profiles but the one whose
-// path matches |ignored_profile_path|.
-void UpdateAllPrefHashStoresIfRequired(
- const base::FilePath& ignored_profile_path) {
- const ProfileInfoCache& profile_info_cache =
- g_browser_process->profile_manager()->GetProfileInfoCache();
- const size_t n_profiles = profile_info_cache.GetNumberOfProfiles();
- for (size_t i = 0; i < n_profiles; ++i) {
- const base::FilePath profile_path =
- profile_info_cache.GetPathOfProfileAtIndex(i);
- if (profile_path != ignored_profile_path) {
- CreateProfilePrefStoreManager(profile_path)
- ->UpdateProfileHashStoreIfRequired(
- JsonPrefStore::GetTaskRunnerForFile(
- profile_path, BrowserThread::GetBlockingPool()));
- }
- }
-}
-
} // namespace
namespace chrome_prefs {
@@ -494,28 +475,6 @@ void DisableDelaysAndDomainCheckForTesting() {
g_disable_delays_and_domain_check_for_testing = true;
}
-void SchedulePrefHashStoresUpdateCheck(
- const base::FilePath& initial_profile_path) {
- if (!ProfilePrefStoreManager::kPlatformSupportsPreferenceTracking) {
- ProfilePrefStoreManager::ResetAllPrefHashStores(
- g_browser_process->local_state());
- return;
- }
-
- if (GetSettingsEnforcementGroup() >= GROUP_ENFORCE_ALWAYS)
- return;
-
- const int kDefaultPrefHashStoresUpdateCheckDelaySeconds = 55;
- BrowserThread::PostDelayedTask(
- BrowserThread::UI,
- FROM_HERE,
- base::Bind(&UpdateAllPrefHashStoresIfRequired,
- initial_profile_path),
- base::TimeDelta::FromSeconds(
- g_disable_delays_and_domain_check_for_testing ?
- 0 : kDefaultPrefHashStoresUpdateCheckDelaySeconds));
-}
-
void ResetPrefHashStore(const base::FilePath& profile_path) {
CreateProfilePrefStoreManager(profile_path)->ResetPrefHashStore();
}

Powered by Google App Engine
This is Rietveld 408576698