| OLD | NEW |
| 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 859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 870 // Cocoa Bindings. | 870 // Cocoa Bindings. |
| 871 // Handles prefs for the "Basics" panel. | 871 // Handles prefs for the "Basics" panel. |
| 872 - (void)basicsPrefChanged:(std::wstring*)prefName { | 872 - (void)basicsPrefChanged:(std::wstring*)prefName { |
| 873 if (*prefName == prefs::kRestoreOnStartup) { | 873 if (*prefName == prefs::kRestoreOnStartup) { |
| 874 const SessionStartupPref startupPref = | 874 const SessionStartupPref startupPref = |
| 875 SessionStartupPref::GetStartupPref(prefs_); | 875 SessionStartupPref::GetStartupPref(prefs_); |
| 876 [self setRestoreOnStartupIndex:startupPref.type]; | 876 [self setRestoreOnStartupIndex:startupPref.type]; |
| 877 } | 877 } |
| 878 | 878 |
| 879 if (*prefName == prefs::kURLsToRestoreOnStartup) { | 879 if (*prefName == prefs::kURLsToRestoreOnStartup) { |
| 880 const SessionStartupPref startupPref = | 880 [customPagesSource_ reloadURLs]; |
| 881 SessionStartupPref::GetStartupPref(prefs_); | |
| 882 [customPagesSource_ setURLs:startupPref.urls]; | |
| 883 } | 881 } |
| 884 | 882 |
| 885 if (*prefName == prefs::kHomePageIsNewTabPage) { | 883 if (*prefName == prefs::kHomePageIsNewTabPage) { |
| 886 NSInteger useNewTabPage = newTabPageIsHomePage_.GetValue() ? 0 : 1; | 884 NSInteger useNewTabPage = newTabPageIsHomePage_.GetValue() ? 0 : 1; |
| 887 [self setNewTabPageIsHomePageIndex:useNewTabPage]; | 885 [self setNewTabPageIsHomePageIndex:useNewTabPage]; |
| 888 } | 886 } |
| 889 if (*prefName == prefs::kHomePage) { | 887 if (*prefName == prefs::kHomePage) { |
| 890 NSString* value = base::SysUTF8ToNSString(homepage_.GetValue()); | 888 NSString* value = base::SysUTF8ToNSString(homepage_.GetValue()); |
| 891 [self setHomepageURL:value]; | 889 [self setHomepageURL:value]; |
| 892 } | 890 } |
| (...skipping 1163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2056 case OPTIONS_PAGE_ADVANCED: | 2054 case OPTIONS_PAGE_ADVANCED: |
| 2057 return underTheHoodView_; | 2055 return underTheHoodView_; |
| 2058 case OPTIONS_PAGE_DEFAULT: | 2056 case OPTIONS_PAGE_DEFAULT: |
| 2059 case OPTIONS_PAGE_COUNT: | 2057 case OPTIONS_PAGE_COUNT: |
| 2060 LOG(DFATAL) << "Invalid page value " << page; | 2058 LOG(DFATAL) << "Invalid page value " << page; |
| 2061 } | 2059 } |
| 2062 return basicsView_; | 2060 return basicsView_; |
| 2063 } | 2061 } |
| 2064 | 2062 |
| 2065 @end | 2063 @end |
| OLD | NEW |