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

Side by Side Diff: chrome/browser/cocoa/preferences_window_controller.mm

Issue 661327: Fix the content page of the options dialog to use kAutoFillEnabled instead of... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #import "chrome/browser/cocoa/preferences_window_controller.h" 5 #import "chrome/browser/cocoa/preferences_window_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "app/l10n_util_mac.h" 10 #include "app/l10n_util_mac.h"
(...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after
794 newTabPageIsHomePage_.Init(prefs::kHomePageIsNewTabPage, 794 newTabPageIsHomePage_.Init(prefs::kHomePageIsNewTabPage,
795 prefs_, observer_.get()); 795 prefs_, observer_.get());
796 homepage_.Init(prefs::kHomePage, prefs_, observer_.get()); 796 homepage_.Init(prefs::kHomePage, prefs_, observer_.get());
797 showHomeButton_.Init(prefs::kShowHomeButton, prefs_, observer_.get()); 797 showHomeButton_.Init(prefs::kShowHomeButton, prefs_, observer_.get());
798 showPageOptionButtons_.Init(prefs::kShowPageOptionsButtons, prefs_, 798 showPageOptionButtons_.Init(prefs::kShowPageOptionsButtons, prefs_,
799 observer_.get()); 799 observer_.get());
800 800
801 // Personal Stuff panel 801 // Personal Stuff panel
802 askSavePasswords_.Init(prefs::kPasswordManagerEnabled, 802 askSavePasswords_.Init(prefs::kPasswordManagerEnabled,
803 prefs_, observer_.get()); 803 prefs_, observer_.get());
804 formAutofill_.Init(prefs::kFormAutofillEnabled, prefs_, observer_.get()); 804 formAutofill_.Init(prefs::kAutoFillEnabled, prefs_, observer_.get());
805 currentTheme_.Init(prefs::kCurrentThemeID, prefs_, observer_.get()); 805 currentTheme_.Init(prefs::kCurrentThemeID, prefs_, observer_.get());
806 806
807 // Under the hood panel 807 // Under the hood panel
808 alternateErrorPages_.Init(prefs::kAlternateErrorPagesEnabled, 808 alternateErrorPages_.Init(prefs::kAlternateErrorPagesEnabled,
809 prefs_, observer_.get()); 809 prefs_, observer_.get());
810 useSuggest_.Init(prefs::kSearchSuggestEnabled, prefs_, observer_.get()); 810 useSuggest_.Init(prefs::kSearchSuggestEnabled, prefs_, observer_.get());
811 dnsPrefetch_.Init(prefs::kDnsPrefetchingEnabled, prefs_, observer_.get()); 811 dnsPrefetch_.Init(prefs::kDnsPrefetchingEnabled, prefs_, observer_.get());
812 safeBrowsing_.Init(prefs::kSafeBrowsingEnabled, prefs_, observer_.get()); 812 safeBrowsing_.Init(prefs::kSafeBrowsingEnabled, prefs_, observer_.get());
813 813
814 // During unit tests, there is no local state object, so we fall back to 814 // During unit tests, there is no local state object, so we fall back to
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
1230 1230
1231 // Callback when preferences are changed. |prefName| is the name of the pref 1231 // Callback when preferences are changed. |prefName| is the name of the pref
1232 // that has changed. Unlike on Windows, we don't need to use this method for 1232 // that has changed. Unlike on Windows, we don't need to use this method for
1233 // initializing, that's handled by Cocoa Bindings. 1233 // initializing, that's handled by Cocoa Bindings.
1234 // Handles prefs for the "Personal Stuff" panel. 1234 // Handles prefs for the "Personal Stuff" panel.
1235 - (void)userDataPrefChanged:(std::wstring*)prefName { 1235 - (void)userDataPrefChanged:(std::wstring*)prefName {
1236 if (*prefName == prefs::kPasswordManagerEnabled) { 1236 if (*prefName == prefs::kPasswordManagerEnabled) {
1237 [self setPasswordManagerEnabledIndex:askSavePasswords_.GetValue() ? 1237 [self setPasswordManagerEnabledIndex:askSavePasswords_.GetValue() ?
1238 kEnabledIndex : kDisabledIndex]; 1238 kEnabledIndex : kDisabledIndex];
1239 } 1239 }
1240 if (*prefName == prefs::kFormAutofillEnabled) { 1240 if (*prefName == prefs::kAutoFillEnabled) {
1241 [self setFormAutofillEnabledIndex:formAutofill_.GetValue() ? 1241 [self setFormAutofillEnabledIndex:formAutofill_.GetValue() ?
1242 kEnabledIndex : kDisabledIndex]; 1242 kEnabledIndex : kDisabledIndex];
1243 } 1243 }
1244 if (*prefName == prefs::kCurrentThemeID) { 1244 if (*prefName == prefs::kCurrentThemeID) {
1245 [self setIsUsingDefaultTheme:currentTheme_.GetValue().length() == 0]; 1245 [self setIsUsingDefaultTheme:currentTheme_.GetValue().length() == 0];
1246 } 1246 }
1247 } 1247 }
1248 1248
1249 // Called to launch the Keychain Access app to show the user's stored 1249 // Called to launch the Keychain Access app to show the user's stored
1250 // passwords. 1250 // passwords.
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after
1906 case OPTIONS_PAGE_ADVANCED: 1906 case OPTIONS_PAGE_ADVANCED:
1907 return underTheHoodView_; 1907 return underTheHoodView_;
1908 case OPTIONS_PAGE_DEFAULT: 1908 case OPTIONS_PAGE_DEFAULT:
1909 case OPTIONS_PAGE_COUNT: 1909 case OPTIONS_PAGE_COUNT:
1910 LOG(DFATAL) << "Invalid page value " << page; 1910 LOG(DFATAL) << "Invalid page value " << page;
1911 } 1911 }
1912 return basicsView_; 1912 return basicsView_;
1913 } 1913 }
1914 1914
1915 @end 1915 @end
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/gtk/options/content_page_gtk.cc » ('j') | chrome/browser/gtk/options/content_page_gtk.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698