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

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

Issue 18199003: Allow Chrome OS login profile to have different default pref values (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years, 5 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 | Annotate | Revision Log
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 <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 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 // profile. All preferences that store information about the browsing history 484 // profile. All preferences that store information about the browsing history
485 // or behavior of the user should have this property. 485 // or behavior of the user should have this property.
486 pref_store->RegisterOverlayPref(prefs::kBrowserWindowPlacement); 486 pref_store->RegisterOverlayPref(prefs::kBrowserWindowPlacement);
487 pref_store->RegisterOverlayPref(prefs::kSaveFileDefaultDirectory); 487 pref_store->RegisterOverlayPref(prefs::kSaveFileDefaultDirectory);
488 #if defined(OS_ANDROID) || defined(OS_IOS) 488 #if defined(OS_ANDROID) || defined(OS_IOS)
489 pref_store->RegisterOverlayPref(prefs::kProxy); 489 pref_store->RegisterOverlayPref(prefs::kProxy);
490 #endif // defined(OS_ANDROID) || defined(OS_IOS) 490 #endif // defined(OS_ANDROID) || defined(OS_IOS)
491 } 491 }
492 492
493 // static 493 // static
494 void PrefsTabHelper::RegisterUserPrefs( 494 void PrefsTabHelper::RegisterProfilePrefs(
495 user_prefs::PrefRegistrySyncable* registry) { 495 user_prefs::PrefRegistrySyncable* registry) {
496 WebPreferences pref_defaults; 496 WebPreferences pref_defaults;
497 registry->RegisterBooleanPref( 497 registry->RegisterBooleanPref(
498 prefs::kWebKitJavascriptEnabled, 498 prefs::kWebKitJavascriptEnabled,
499 pref_defaults.javascript_enabled, 499 pref_defaults.javascript_enabled,
500 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 500 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
501 registry->RegisterBooleanPref( 501 registry->RegisterBooleanPref(
502 prefs::kWebKitWebSecurityEnabled, 502 prefs::kWebKitWebSecurityEnabled,
503 pref_defaults.web_security_enabled, 503 pref_defaults.web_security_enabled,
504 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 504 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 WebPreferences web_prefs = 711 WebPreferences web_prefs =
712 web_contents_->GetRenderViewHost()->GetWebkitPreferences(); 712 web_contents_->GetRenderViewHost()->GetWebkitPreferences();
713 OverrideFontFamily(&web_prefs, generic_family, script, std::string()); 713 OverrideFontFamily(&web_prefs, generic_family, script, std::string());
714 web_contents_->GetRenderViewHost()->UpdateWebkitPreferences(web_prefs); 714 web_contents_->GetRenderViewHost()->UpdateWebkitPreferences(web_prefs);
715 return; 715 return;
716 } 716 }
717 } 717 }
718 718
719 UpdateWebPreferences(); 719 UpdateWebPreferences();
720 } 720 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/prefs/prefs_tab_helper.h ('k') | chrome/browser/ui/sync/profile_signin_confirmation_helper_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698