| 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" |
| 11 #include "app/resource_bundle.h" | 11 #include "app/resource_bundle.h" |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/mac_util.h" | 13 #include "base/mac_util.h" |
| 14 #include "base/scoped_aedesc.h" | 14 #include "base/mac/scoped_aedesc.h" |
| 15 #include "base/string16.h" | 15 #include "base/string16.h" |
| 16 #include "base/string_util.h" | 16 #include "base/string_util.h" |
| 17 #include "base/sys_string_conversions.h" | 17 #include "base/sys_string_conversions.h" |
| 18 #include "chrome/browser/autofill/autofill_dialog.h" | 18 #include "chrome/browser/autofill/autofill_dialog.h" |
| 19 #include "chrome/browser/autofill/autofill_type.h" | 19 #include "chrome/browser/autofill/autofill_type.h" |
| 20 #include "chrome/browser/autofill/personal_data_manager.h" | 20 #include "chrome/browser/autofill/personal_data_manager.h" |
| 21 #include "chrome/browser/browser.h" | 21 #include "chrome/browser/browser.h" |
| 22 #include "chrome/browser/browser_list.h" | 22 #include "chrome/browser/browser_list.h" |
| 23 #include "chrome/browser/browser_process.h" | 23 #include "chrome/browser/browser_process.h" |
| 24 #import "chrome/browser/cocoa/clear_browsing_data_controller.h" | 24 #import "chrome/browser/cocoa/clear_browsing_data_controller.h" |
| (...skipping 1488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1513 - (IBAction)resetAutoOpenFiles:(id)sender { | 1513 - (IBAction)resetAutoOpenFiles:(id)sender { |
| 1514 profile_->GetDownloadManager()->download_prefs()->ResetAutoOpen(); | 1514 profile_->GetDownloadManager()->download_prefs()->ResetAutoOpen(); |
| 1515 [self recordUserAction:UserMetricsAction("Options_ResetAutoOpenFiles")]; | 1515 [self recordUserAction:UserMetricsAction("Options_ResetAutoOpenFiles")]; |
| 1516 } | 1516 } |
| 1517 | 1517 |
| 1518 - (IBAction)openProxyPreferences:(id)sender { | 1518 - (IBAction)openProxyPreferences:(id)sender { |
| 1519 NSArray* itemsToOpen = [NSArray arrayWithObject:[NSURL fileURLWithPath: | 1519 NSArray* itemsToOpen = [NSArray arrayWithObject:[NSURL fileURLWithPath: |
| 1520 @"/System/Library/PreferencePanes/Network.prefPane"]]; | 1520 @"/System/Library/PreferencePanes/Network.prefPane"]]; |
| 1521 | 1521 |
| 1522 const char* proxyPrefCommand = "Proxies"; | 1522 const char* proxyPrefCommand = "Proxies"; |
| 1523 scoped_aedesc<> openParams; | 1523 base::mac::ScopedAEDesc<> openParams; |
| 1524 OSStatus status = AECreateDesc('ptru', | 1524 OSStatus status = AECreateDesc('ptru', |
| 1525 proxyPrefCommand, | 1525 proxyPrefCommand, |
| 1526 strlen(proxyPrefCommand), | 1526 strlen(proxyPrefCommand), |
| 1527 openParams.OutPointer()); | 1527 openParams.OutPointer()); |
| 1528 LOG_IF(ERROR, status != noErr) << "Failed to create open params: " << status; | 1528 LOG_IF(ERROR, status != noErr) << "Failed to create open params: " << status; |
| 1529 | 1529 |
| 1530 LSLaunchURLSpec launchSpec = { 0 }; | 1530 LSLaunchURLSpec launchSpec = { 0 }; |
| 1531 launchSpec.itemURLs = (CFArrayRef)itemsToOpen; | 1531 launchSpec.itemURLs = (CFArrayRef)itemsToOpen; |
| 1532 launchSpec.passThruParams = openParams; | 1532 launchSpec.passThruParams = openParams; |
| 1533 launchSpec.launchFlags = kLSLaunchAsync | kLSLaunchDontAddToRecents; | 1533 launchSpec.launchFlags = kLSLaunchAsync | kLSLaunchDontAddToRecents; |
| (...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2122 case OPTIONS_PAGE_ADVANCED: | 2122 case OPTIONS_PAGE_ADVANCED: |
| 2123 return underTheHoodView_; | 2123 return underTheHoodView_; |
| 2124 case OPTIONS_PAGE_DEFAULT: | 2124 case OPTIONS_PAGE_DEFAULT: |
| 2125 case OPTIONS_PAGE_COUNT: | 2125 case OPTIONS_PAGE_COUNT: |
| 2126 LOG(DFATAL) << "Invalid page value " << page; | 2126 LOG(DFATAL) << "Invalid page value " << page; |
| 2127 } | 2127 } |
| 2128 return basicsView_; | 2128 return basicsView_; |
| 2129 } | 2129 } |
| 2130 | 2130 |
| 2131 @end | 2131 @end |
| OLD | NEW |