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

Side by Side Diff: chrome/browser/ui/prefs/prefs_tab_helper.cc

Issue 944433002: Revamp the MigrateBrowserPrefs and MigrateUserPrefs code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: extra removal Created 5 years, 10 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 (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/ui/prefs/prefs_tab_helper.h" 5 #include "chrome/browser/ui/prefs/prefs_tab_helper.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/singleton.h" 10 #include "base/memory/singleton.h"
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 PrefsTabHelper::~PrefsTabHelper() { 500 PrefsTabHelper::~PrefsTabHelper() {
501 PrefWatcher::Get(profile_)->UnregisterHelper(this); 501 PrefWatcher::Get(profile_)->UnregisterHelper(this);
502 } 502 }
503 503
504 // static 504 // static
505 void PrefsTabHelper::InitIncognitoUserPrefStore( 505 void PrefsTabHelper::InitIncognitoUserPrefStore(
506 OverlayUserPrefStore* pref_store) { 506 OverlayUserPrefStore* pref_store) {
507 // List of keys that cannot be changed in the user prefs file by the incognito 507 // List of keys that cannot be changed in the user prefs file by the incognito
508 // profile. All preferences that store information about the browsing history 508 // profile. All preferences that store information about the browsing history
509 // or behavior of the user should have this property. 509 // or behavior of the user should have this property.
510 pref_store->RegisterOverlayPref(prefs::kBrowserWindowPlacement);
gab 2015/02/23 16:09:38 Do not remove this.
rkaplow 2015/02/23 23:27:53 Done.
511 pref_store->RegisterOverlayPref(prefs::kSaveFileDefaultDirectory); 510 pref_store->RegisterOverlayPref(prefs::kSaveFileDefaultDirectory);
512 #if defined(OS_ANDROID) || defined(OS_IOS) 511 #if defined(OS_ANDROID) || defined(OS_IOS)
513 pref_store->RegisterOverlayPref(prefs::kProxy); 512 pref_store->RegisterOverlayPref(prefs::kProxy);
514 #endif // defined(OS_ANDROID) || defined(OS_IOS) 513 #endif // defined(OS_ANDROID) || defined(OS_IOS)
515 } 514 }
516 515
517 // static 516 // static
518 void PrefsTabHelper::RegisterProfilePrefs( 517 void PrefsTabHelper::RegisterProfilePrefs(
519 user_prefs::PrefRegistrySyncable* registry) { 518 user_prefs::PrefRegistrySyncable* registry) {
520 WebPreferences pref_defaults; 519 WebPreferences pref_defaults;
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
736 } 735 }
737 } 736 }
738 737
739 void PrefsTabHelper::OnWebPrefChanged(const std::string& pref_name) { 738 void PrefsTabHelper::OnWebPrefChanged(const std::string& pref_name) {
740 #if !defined(OS_ANDROID) 739 #if !defined(OS_ANDROID)
741 OnFontFamilyPrefChanged(pref_name); 740 OnFontFamilyPrefChanged(pref_name);
742 #endif 741 #endif
743 742
744 web_contents_->GetRenderViewHost()->OnWebkitPreferencesChanged(); 743 web_contents_->GetRenderViewHost()->OnWebkitPreferencesChanged();
745 } 744 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698