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

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

Issue 2896763003: Remove the kHideFullscreenToolbar Preference (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « no previous file | chrome/browser/ui/browser_ui_prefs.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 697 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 // Added 11/2016 708 // Added 11/2016
709 local_state->ClearPref(prefs::kTouchscreenEnabled); 709 local_state->ClearPref(prefs::kTouchscreenEnabled);
710 local_state->ClearPref(prefs::kTouchpadEnabled); 710 local_state->ClearPref(prefs::kTouchpadEnabled);
711 #endif // defined(OS_CHROMEOS) 711 #endif // defined(OS_CHROMEOS)
712 } 712 }
713 713
714 // This method should be periodically pruned of year+ old migrations. 714 // This method should be periodically pruned of year+ old migrations.
715 void MigrateObsoleteProfilePrefs(Profile* profile) { 715 void MigrateObsoleteProfilePrefs(Profile* profile) {
716 PrefService* profile_prefs = profile->GetPrefs(); 716 PrefService* profile_prefs = profile->GetPrefs();
717 717
718 #if defined(OS_MACOSX)
719 // Migrate the value of kHideFullscreenToolbar to kShowFullscreenToolbar if
720 // it was set by the user. See crbug.com/590827.
721 // Added 03/2016.
722 const PrefService::Preference* hide_pref =
723 profile_prefs->FindPreference(prefs::kHideFullscreenToolbar);
724 if (!hide_pref->IsDefaultValue()) {
725 bool hide_pref_value =
726 profile_prefs->GetBoolean(prefs::kHideFullscreenToolbar);
727 profile_prefs->SetBoolean(prefs::kShowFullscreenToolbar, !hide_pref_value);
728 profile_prefs->ClearPref(prefs::kHideFullscreenToolbar);
729 }
730 #endif
731
732 #if BUILDFLAG(ENABLE_GOOGLE_NOW) 718 #if BUILDFLAG(ENABLE_GOOGLE_NOW)
733 // Added 3/2016. 719 // Added 3/2016.
734 profile_prefs->ClearPref(kGoogleGeolocationAccessEnabled); 720 profile_prefs->ClearPref(kGoogleGeolocationAccessEnabled);
735 #endif 721 #endif
736 722
737 // Added 4/2016. 723 // Added 4/2016.
738 if (!profile_prefs->GetBoolean(kCheckDefaultBrowser)) { 724 if (!profile_prefs->GetBoolean(kCheckDefaultBrowser)) {
739 // Seed kDefaultBrowserLastDeclined with the install date. 725 // Seed kDefaultBrowserLastDeclined with the install date.
740 metrics::MetricsService* metrics_service = 726 metrics::MetricsService* metrics_service =
741 g_browser_process->metrics_service(); 727 g_browser_process->metrics_service();
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
818 // default values for all prefs locally. Since we already have the defaults it 804 // default values for all prefs locally. Since we already have the defaults it
819 // would be wasteful to request them from the service by connecting to the 805 // would be wasteful to request them from the service by connecting to the
820 // DEFAULT_STORE. 806 // DEFAULT_STORE.
821 // TODO(sammc): Once we have this distinction, connect to the default pref 807 // TODO(sammc): Once we have this distinction, connect to the default pref
822 // store here (by erasing it from |pref_stores|). 808 // store here (by erasing it from |pref_stores|).
823 pref_stores.erase(PrefValueStore::USER_STORE); 809 pref_stores.erase(PrefValueStore::USER_STORE);
824 return pref_stores; 810 return pref_stores;
825 } 811 }
826 812
827 } // namespace chrome 813 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/browser_ui_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698