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

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

Issue 1296663003: Componentize proxy code from chrome/browser/net (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updating for win p/f Created 5 years, 3 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 11 matching lines...) Expand all
22 #include "chrome/browser/renderer_preferences_util.h" 22 #include "chrome/browser/renderer_preferences_util.h"
23 #include "chrome/browser/ui/zoom/chrome_zoom_level_prefs.h" 23 #include "chrome/browser/ui/zoom/chrome_zoom_level_prefs.h"
24 #include "chrome/common/pref_font_webkit_names.h" 24 #include "chrome/common/pref_font_webkit_names.h"
25 #include "chrome/common/pref_names.h" 25 #include "chrome/common/pref_names.h"
26 #include "chrome/common/pref_names_util.h" 26 #include "chrome/common/pref_names_util.h"
27 #include "chrome/grit/locale_settings.h" 27 #include "chrome/grit/locale_settings.h"
28 #include "components/keyed_service/content/browser_context_dependency_manager.h" 28 #include "components/keyed_service/content/browser_context_dependency_manager.h"
29 #include "components/keyed_service/content/browser_context_keyed_service_factory .h" 29 #include "components/keyed_service/content/browser_context_keyed_service_factory .h"
30 #include "components/keyed_service/core/keyed_service.h" 30 #include "components/keyed_service/core/keyed_service.h"
31 #include "components/pref_registry/pref_registry_syncable.h" 31 #include "components/pref_registry/pref_registry_syncable.h"
32 #include "components/proxy_config/proxy_config_pref_names.h"
32 #include "content/public/browser/notification_details.h" 33 #include "content/public/browser/notification_details.h"
33 #include "content/public/browser/notification_service.h" 34 #include "content/public/browser/notification_service.h"
34 #include "content/public/browser/render_view_host.h" 35 #include "content/public/browser/render_view_host.h"
35 #include "content/public/browser/web_contents.h" 36 #include "content/public/browser/web_contents.h"
36 #include "content/public/common/renderer_preferences.h" 37 #include "content/public/common/renderer_preferences.h"
37 #include "content/public/common/web_preferences.h" 38 #include "content/public/common/web_preferences.h"
38 #include "grit/platform_locale_settings.h" 39 #include "grit/platform_locale_settings.h"
39 #include "third_party/icu/source/common/unicode/uchar.h" 40 #include "third_party/icu/source/common/unicode/uchar.h"
40 #include "third_party/icu/source/common/unicode/uscript.h" 41 #include "third_party/icu/source/common/unicode/uscript.h"
41 #include "ui/base/l10n/l10n_util.h" 42 #include "ui/base/l10n/l10n_util.h"
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 506
506 // static 507 // static
507 void PrefsTabHelper::InitIncognitoUserPrefStore( 508 void PrefsTabHelper::InitIncognitoUserPrefStore(
508 OverlayUserPrefStore* pref_store) { 509 OverlayUserPrefStore* pref_store) {
509 // List of keys that cannot be changed in the user prefs file by the incognito 510 // List of keys that cannot be changed in the user prefs file by the incognito
510 // profile. All preferences that store information about the browsing history 511 // profile. All preferences that store information about the browsing history
511 // or behavior of the user should have this property. 512 // or behavior of the user should have this property.
512 pref_store->RegisterOverlayPref(prefs::kBrowserWindowPlacement); 513 pref_store->RegisterOverlayPref(prefs::kBrowserWindowPlacement);
513 pref_store->RegisterOverlayPref(prefs::kSaveFileDefaultDirectory); 514 pref_store->RegisterOverlayPref(prefs::kSaveFileDefaultDirectory);
514 #if defined(OS_ANDROID) || defined(OS_IOS) 515 #if defined(OS_ANDROID) || defined(OS_IOS)
515 pref_store->RegisterOverlayPref(prefs::kProxy); 516 pref_store->RegisterOverlayPref(proxy_config::prefs::kProxy);
516 #endif // defined(OS_ANDROID) || defined(OS_IOS) 517 #endif // defined(OS_ANDROID) || defined(OS_IOS)
517 } 518 }
518 519
519 // static 520 // static
520 void PrefsTabHelper::RegisterProfilePrefs( 521 void PrefsTabHelper::RegisterProfilePrefs(
521 user_prefs::PrefRegistrySyncable* registry) { 522 user_prefs::PrefRegistrySyncable* registry) {
522 WebPreferences pref_defaults; 523 WebPreferences pref_defaults;
523 registry->RegisterBooleanPref(prefs::kWebKitJavascriptEnabled, 524 registry->RegisterBooleanPref(prefs::kWebKitJavascriptEnabled,
524 pref_defaults.javascript_enabled); 525 pref_defaults.javascript_enabled);
525 registry->RegisterBooleanPref(prefs::kWebKitWebSecurityEnabled, 526 registry->RegisterBooleanPref(prefs::kWebKitWebSecurityEnabled,
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 } 685 }
685 } 686 }
686 687
687 void PrefsTabHelper::OnWebPrefChanged(const std::string& pref_name) { 688 void PrefsTabHelper::OnWebPrefChanged(const std::string& pref_name) {
688 #if !defined(OS_ANDROID) 689 #if !defined(OS_ANDROID)
689 OnFontFamilyPrefChanged(pref_name); 690 OnFontFamilyPrefChanged(pref_name);
690 #endif 691 #endif
691 692
692 web_contents_->GetRenderViewHost()->OnWebkitPreferencesChanged(); 693 web_contents_->GetRenderViewHost()->OnWebkitPreferencesChanged();
693 } 694 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698