| 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 #include <chrome/browser/prefs/chrome_command_line_pref_store.h> | 5 #include <chrome/browser/prefs/chrome_command_line_pref_store.h> |
| 6 #include "chrome/browser/prefs/chrome_pref_service_factory.h" | 6 #include "chrome/browser/prefs/chrome_pref_service_factory.h" |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| 11 #include <utility> |
| 11 #include <vector> | 12 #include <vector> |
| 12 | 13 |
| 13 #include "base/bind.h" | 14 #include "base/bind.h" |
| 14 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
| 15 #include "base/files/file_path.h" | 16 #include "base/files/file_path.h" |
| 16 #include "base/macros.h" | 17 #include "base/macros.h" |
| 17 #include "base/memory/ptr_util.h" | 18 #include "base/memory/ptr_util.h" |
| 18 #include "base/metrics/field_trial.h" | 19 #include "base/metrics/field_trial.h" |
| 19 #include "base/metrics/histogram_macros.h" | 20 #include "base/metrics/histogram_macros.h" |
| 20 #include "base/threading/sequenced_worker_pool.h" | 21 #include "base/threading/sequenced_worker_pool.h" |
| (...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 506 } | 507 } |
| 507 | 508 |
| 508 void DisableDomainCheckForTesting() { | 509 void DisableDomainCheckForTesting() { |
| 509 #if defined(OS_WIN) | 510 #if defined(OS_WIN) |
| 510 g_disable_domain_check_for_testing = true; | 511 g_disable_domain_check_for_testing = true; |
| 511 #endif // OS_WIN | 512 #endif // OS_WIN |
| 512 } | 513 } |
| 513 | 514 |
| 514 bool InitializePrefsFromMasterPrefs( | 515 bool InitializePrefsFromMasterPrefs( |
| 515 const base::FilePath& profile_path, | 516 const base::FilePath& profile_path, |
| 516 const base::DictionaryValue& master_prefs) { | 517 std::unique_ptr<base::DictionaryValue> master_prefs) { |
| 517 return CreateProfilePrefStoreManager(profile_path) | 518 return CreateProfilePrefStoreManager(profile_path) |
| 518 ->InitializePrefsFromMasterPrefs(master_prefs); | 519 ->InitializePrefsFromMasterPrefs(std::move(master_prefs)); |
| 519 } | 520 } |
| 520 | 521 |
| 521 base::Time GetResetTime(Profile* profile) { | 522 base::Time GetResetTime(Profile* profile) { |
| 522 return ProfilePrefStoreManager::GetResetTime(profile->GetPrefs()); | 523 return ProfilePrefStoreManager::GetResetTime(profile->GetPrefs()); |
| 523 } | 524 } |
| 524 | 525 |
| 525 void ClearResetTime(Profile* profile) { | 526 void ClearResetTime(Profile* profile) { |
| 526 ProfilePrefStoreManager::ClearResetTime(profile->GetPrefs()); | 527 ProfilePrefStoreManager::ClearResetTime(profile->GetPrefs()); |
| 527 } | 528 } |
| 528 | 529 |
| 529 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { | 530 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { |
| 530 ProfilePrefStoreManager::RegisterProfilePrefs(registry); | 531 ProfilePrefStoreManager::RegisterProfilePrefs(registry); |
| 531 } | 532 } |
| 532 | 533 |
| 533 } // namespace chrome_prefs | 534 } // namespace chrome_prefs |
| OLD | NEW |