OLD | NEW |
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 <string> | 7 #include <string> |
8 | 8 |
9 #include "base/prefs/overlay_user_pref_store.h" | 9 #include "base/prefs/overlay_user_pref_store.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 PrefsTabHelper::~PrefsTabHelper() { | 475 PrefsTabHelper::~PrefsTabHelper() { |
476 } | 476 } |
477 | 477 |
478 // static | 478 // static |
479 void PrefsTabHelper::InitIncognitoUserPrefStore( | 479 void PrefsTabHelper::InitIncognitoUserPrefStore( |
480 OverlayUserPrefStore* pref_store) { | 480 OverlayUserPrefStore* pref_store) { |
481 // List of keys that cannot be changed in the user prefs file by the incognito | 481 // List of keys that cannot be changed in the user prefs file by the incognito |
482 // profile. All preferences that store information about the browsing history | 482 // profile. All preferences that store information about the browsing history |
483 // or behavior of the user should have this property. | 483 // or behavior of the user should have this property. |
484 pref_store->RegisterOverlayPref(prefs::kBrowserWindowPlacement); | 484 pref_store->RegisterOverlayPref(prefs::kBrowserWindowPlacement); |
| 485 pref_store->RegisterOverlayPref(prefs::kSaveFileDefaultDirectory); |
485 #if defined(OS_ANDROID) || defined(OS_IOS) | 486 #if defined(OS_ANDROID) || defined(OS_IOS) |
486 pref_store->RegisterOverlayPref(prefs::kProxy); | 487 pref_store->RegisterOverlayPref(prefs::kProxy); |
487 #endif // defined(OS_ANDROID) || defined(OS_IOS) | 488 #endif // defined(OS_ANDROID) || defined(OS_IOS) |
488 } | 489 } |
489 | 490 |
490 // static | 491 // static |
491 void PrefsTabHelper::RegisterUserPrefs( | 492 void PrefsTabHelper::RegisterUserPrefs( |
492 user_prefs::PrefRegistrySyncable* registry) { | 493 user_prefs::PrefRegistrySyncable* registry) { |
493 WebPreferences pref_defaults; | 494 WebPreferences pref_defaults; |
494 registry->RegisterBooleanPref( | 495 registry->RegisterBooleanPref( |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
713 WebPreferences web_prefs = | 714 WebPreferences web_prefs = |
714 web_contents_->GetRenderViewHost()->GetWebkitPreferences(); | 715 web_contents_->GetRenderViewHost()->GetWebkitPreferences(); |
715 OverrideFontFamily(&web_prefs, generic_family, script, std::string()); | 716 OverrideFontFamily(&web_prefs, generic_family, script, std::string()); |
716 web_contents_->GetRenderViewHost()->UpdateWebkitPreferences(web_prefs); | 717 web_contents_->GetRenderViewHost()->UpdateWebkitPreferences(web_prefs); |
717 return; | 718 return; |
718 } | 719 } |
719 } | 720 } |
720 | 721 |
721 UpdateWebPreferences(); | 722 UpdateWebPreferences(); |
722 } | 723 } |
OLD | NEW |