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

Side by Side Diff: chrome/browser/prefs/browser_prefs.cc

Issue 2791903003: Pref service: have Mash and Chrome connect to the right pref stores (Closed)
Patch Set: ProfilePrefStoreManagerTest: explicit list stores to connect to Created 3 years, 8 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 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
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
OLDNEW
« no previous file with comments | « chrome/browser/prefs/browser_prefs.h ('k') | chrome/browser/prefs/profile_pref_store_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698