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

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

Issue 10985083: Upstreaming SpdyProxy-related switches, OTR logic, and histograms (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 2 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 <string> 7 #include <string>
8 8
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 PrefsTabHelper::~PrefsTabHelper() { 377 PrefsTabHelper::~PrefsTabHelper() {
378 } 378 }
379 379
380 // static 380 // static
381 void PrefsTabHelper::InitIncognitoUserPrefStore( 381 void PrefsTabHelper::InitIncognitoUserPrefStore(
382 OverlayUserPrefStore* pref_store) { 382 OverlayUserPrefStore* pref_store) {
383 // List of keys that cannot be changed in the user prefs file by the incognito 383 // List of keys that cannot be changed in the user prefs file by the incognito
384 // profile. All preferences that store information about the browsing history 384 // profile. All preferences that store information about the browsing history
385 // or behavior of the user should have this property. 385 // or behavior of the user should have this property.
386 pref_store->RegisterOverlayPref(prefs::kBrowserWindowPlacement); 386 pref_store->RegisterOverlayPref(prefs::kBrowserWindowPlacement);
387 #if defined(OS_ANDROID)
388 pref_store->RegisterOverlayPref(prefs::kProxy);
389 #endif
387 } 390 }
388 391
389 // static 392 // static
390 void PrefsTabHelper::RegisterUserPrefs(PrefService* prefs) { 393 void PrefsTabHelper::RegisterUserPrefs(PrefService* prefs) {
391 WebPreferences pref_defaults; 394 WebPreferences pref_defaults;
392 prefs->RegisterBooleanPref(prefs::kWebKitJavascriptEnabled, 395 prefs->RegisterBooleanPref(prefs::kWebKitJavascriptEnabled,
393 pref_defaults.javascript_enabled, 396 pref_defaults.javascript_enabled,
394 PrefService::UNSYNCABLE_PREF); 397 PrefService::UNSYNCABLE_PREF);
395 prefs->RegisterBooleanPref(prefs::kWebKitWebSecurityEnabled, 398 prefs->RegisterBooleanPref(prefs::kWebKitWebSecurityEnabled,
396 pref_defaults.web_security_enabled, 399 pref_defaults.web_security_enabled,
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 547
545 void PrefsTabHelper::UpdateRendererPreferences() { 548 void PrefsTabHelper::UpdateRendererPreferences() {
546 renderer_preferences_util::UpdateFromSystemSettings( 549 renderer_preferences_util::UpdateFromSystemSettings(
547 web_contents_->GetMutableRendererPrefs(), GetProfile()); 550 web_contents_->GetMutableRendererPrefs(), GetProfile());
548 web_contents_->GetRenderViewHost()->SyncRendererPrefs(); 551 web_contents_->GetRenderViewHost()->SyncRendererPrefs();
549 } 552 }
550 553
551 Profile* PrefsTabHelper::GetProfile() { 554 Profile* PrefsTabHelper::GetProfile() {
552 return Profile::FromBrowserContext(web_contents_->GetBrowserContext()); 555 return Profile::FromBrowserContext(web_contents_->GetBrowserContext());
553 } 556 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698