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

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: Update PrefServiceFactoryTest 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 773 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 int rlz_ping_delay = 0; 784 int rlz_ping_delay = 0;
785 if (distro_dict && 785 if (distro_dict &&
786 distro_dict->GetInteger(kDistroRlzPingDelay, &rlz_ping_delay)) { 786 distro_dict->GetInteger(kDistroRlzPingDelay, &rlz_ping_delay)) {
787 profile_prefs->SetInteger(prefs::kRlzPingDelaySeconds, rlz_ping_delay); 787 profile_prefs->SetInteger(prefs::kRlzPingDelaySeconds, rlz_ping_delay);
788 } 788 }
789 #endif // BUILDFLAG(ENABLE_RLZ) 789 #endif // BUILDFLAG(ENABLE_RLZ)
790 profile_prefs->ClearPref(kDistroDict); 790 profile_prefs->ClearPref(kDistroDict);
791 } 791 }
792 } 792 }
793 793
794 std::set<PrefValueStore::PrefStoreType> ExpectedPrefStores() {
795 return std::set<PrefValueStore::PrefStoreType>({
796 PrefValueStore::MANAGED_STORE,
Bernhard Bauer 2017/04/03 10:37:39 <sigh> I guess clang-format doesn't deal with init
tibell 2017/04/04 04:05:59 Done.
797 #if BUILDFLAG(ENABLE_SUPERVISED_USERS)
798 PrefValueStore::SUPERVISED_USER_STORE,
799 #endif
800 #if BUILDFLAG(ENABLE_EXTENSIONS)
801 PrefValueStore::EXTENSION_STORE,
802 #endif
803 PrefValueStore::COMMAND_LINE_STORE, PrefValueStore::RECOMMENDED_STORE,
804 PrefValueStore::DEFAULT_STORE
Bernhard Bauer 2017/04/03 10:37:40 Why is the USER_STORE missing here?
tibell 2017/04/04 04:05:59 It's always present, but I changed the code to all
805 });
806 }
807
808 std::set<PrefValueStore::PrefStoreType> InProcessPrefStores() {
Bernhard Bauer 2017/04/03 10:37:39 I guess you could really implement this method in
tibell 2017/04/04 04:05:59 Done.
809 return std::set<PrefValueStore::PrefStoreType>({
810 PrefValueStore::MANAGED_STORE,
811 #if BUILDFLAG(ENABLE_SUPERVISED_USERS)
812 PrefValueStore::SUPERVISED_USER_STORE,
813 #endif
814 #if BUILDFLAG(ENABLE_EXTENSIONS)
815 PrefValueStore::EXTENSION_STORE,
816 #endif
817 PrefValueStore::COMMAND_LINE_STORE, PrefValueStore::USER_STORE,
818 PrefValueStore::RECOMMENDED_STORE,
819 });
820 }
821
794 } // namespace chrome 822 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698