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

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

Issue 3110019: [Mac] Poke KVO for prefs::kDownloadDefaultDirectory when resetting to default values. (Closed) Base URL: http://src.chromium.org/git/chromium.git
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
« no previous file with comments | « no previous file | 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 1360 matching lines...) Expand 10 before | Expand all | Expand 10 after
1371 } 1371 }
1372 else if (*prefName == prefs::kDnsPrefetchingEnabled) { 1372 else if (*prefName == prefs::kDnsPrefetchingEnabled) {
1373 [self setDnsPrefetch:dnsPrefetch_.GetValue() ? YES : NO]; 1373 [self setDnsPrefetch:dnsPrefetch_.GetValue() ? YES : NO];
1374 } 1374 }
1375 else if (*prefName == prefs::kSafeBrowsingEnabled) { 1375 else if (*prefName == prefs::kSafeBrowsingEnabled) {
1376 [self setSafeBrowsing:safeBrowsing_.GetValue() ? YES : NO]; 1376 [self setSafeBrowsing:safeBrowsing_.GetValue() ? YES : NO];
1377 } 1377 }
1378 else if (*prefName == prefs::kMetricsReportingEnabled) { 1378 else if (*prefName == prefs::kMetricsReportingEnabled) {
1379 [self setMetricsRecording:metricsRecording_.GetValue() ? YES : NO]; 1379 [self setMetricsRecording:metricsRecording_.GetValue() ? YES : NO];
1380 } 1380 }
1381 else if (*prefName == prefs::kDownloadDefaultDirectory) {
1382 // Poke KVO.
1383 [self willChangeValueForKey:@"defaultDownloadLocation"];
1384 [self didChangeValueForKey:@"defaultDownloadLocation"];
1385 }
1381 else if (*prefName == prefs::kPromptForDownload) { 1386 else if (*prefName == prefs::kPromptForDownload) {
1382 [self setAskForSaveLocation:askForSaveLocation_.GetValue() ? YES : NO]; 1387 [self setAskForSaveLocation:askForSaveLocation_.GetValue() ? YES : NO];
1383 } 1388 }
1384 else if (*prefName == prefs::kEnableTranslate) { 1389 else if (*prefName == prefs::kEnableTranslate) {
1385 [self setTranslateEnabled:translateEnabled_.GetValue() ? YES : NO]; 1390 [self setTranslateEnabled:translateEnabled_.GetValue() ? YES : NO];
1386 } 1391 }
1387 else if (*prefName == prefs::kWebkitTabsToLinks) { 1392 else if (*prefName == prefs::kWebkitTabsToLinks) {
1388 [self setTabsToLinks:tabsToLinks_.GetValue() ? YES : NO]; 1393 [self setTabsToLinks:tabsToLinks_.GetValue() ? YES : NO];
1389 } 1394 }
1390 else if (*prefName == prefs::kDownloadExtensionsToOpen) { 1395 else if (*prefName == prefs::kDownloadExtensionsToOpen) {
(...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after
2074 case OPTIONS_PAGE_ADVANCED: 2079 case OPTIONS_PAGE_ADVANCED:
2075 return underTheHoodView_; 2080 return underTheHoodView_;
2076 case OPTIONS_PAGE_DEFAULT: 2081 case OPTIONS_PAGE_DEFAULT:
2077 case OPTIONS_PAGE_COUNT: 2082 case OPTIONS_PAGE_COUNT:
2078 LOG(DFATAL) << "Invalid page value " << page; 2083 LOG(DFATAL) << "Invalid page value " << page;
2079 } 2084 }
2080 return basicsView_; 2085 return basicsView_;
2081 } 2086 }
2082 2087
2083 @end 2088 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698