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

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

Issue 3045020: Merge 53961 - [Mac] Fix the custom homepages preferences to:... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/472/src/
Patch Set: Created 10 years, 4 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
« no previous file with comments | « chrome/browser/cocoa/custom_home_pages_model_unittest.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 859 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/custom_home_pages_model_unittest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698