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 1360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 |
OLD | NEW |