| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/browser_prefs.h" | 5 #include "chrome/browser/prefs/browser_prefs.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
| 10 #include "base/metrics/histogram_macros.h" | 10 #include "base/metrics/histogram_macros.h" |
| (...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 786 int rlz_ping_delay = 0; | 786 int rlz_ping_delay = 0; |
| 787 if (distro_dict && | 787 if (distro_dict && |
| 788 distro_dict->GetInteger(kDistroRlzPingDelay, &rlz_ping_delay)) { | 788 distro_dict->GetInteger(kDistroRlzPingDelay, &rlz_ping_delay)) { |
| 789 profile_prefs->SetInteger(prefs::kRlzPingDelaySeconds, rlz_ping_delay); | 789 profile_prefs->SetInteger(prefs::kRlzPingDelaySeconds, rlz_ping_delay); |
| 790 } | 790 } |
| 791 #endif // BUILDFLAG(ENABLE_RLZ) | 791 #endif // BUILDFLAG(ENABLE_RLZ) |
| 792 profile_prefs->ClearPref(kDistroDict); | 792 profile_prefs->ClearPref(kDistroDict); |
| 793 } | 793 } |
| 794 } | 794 } |
| 795 | 795 |
| 796 std::set<PrefValueStore::PrefStoreType> ExpectedPrefStores() { |
| 797 return std::set<PrefValueStore::PrefStoreType>({ |
| 798 PrefValueStore::MANAGED_STORE, |
| 799 #if BUILDFLAG(ENABLE_SUPERVISED_USERS) |
| 800 PrefValueStore::SUPERVISED_USER_STORE, |
| 801 #endif |
| 802 #if BUILDFLAG(ENABLE_EXTENSIONS) |
| 803 PrefValueStore::EXTENSION_STORE, |
| 804 #endif |
| 805 PrefValueStore::COMMAND_LINE_STORE, PrefValueStore::RECOMMENDED_STORE, |
| 806 PrefValueStore::USER_STORE, PrefValueStore::DEFAULT_STORE |
| 807 }); |
| 808 } |
| 809 |
| 810 std::set<PrefValueStore::PrefStoreType> InProcessPrefStores() { |
| 811 auto pref_stores = ExpectedPrefStores(); |
| 812 pref_stores.erase(PrefValueStore::DEFAULT_STORE); |
| 813 pref_stores.erase(PrefValueStore::USER_STORE); |
| 814 return pref_stores; |
| 815 } |
| 816 |
| 796 } // namespace chrome | 817 } // namespace chrome |
| OLD | NEW |