summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-16 13:10:11 +0000
committerrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-16 13:10:11 +0000
commita76915318c5e3d7dbeed35253627df270017f5ce (patch)
tree746fb340d9f10ab95222677c7a07ffdd20e242d7
parent672ced365f6ed02358431ddb79c59c56a7c93c12 (diff)
downloadchromium_src-a76915318c5e3d7dbeed35253627df270017f5ce.zip
chromium_src-a76915318c5e3d7dbeed35253627df270017f5ce.tar.gz
chromium_src-a76915318c5e3d7dbeed35253627df270017f5ce.tar.bz2
Convert other callsites of AECreateDesc() to use scoped_aedesc<>.
BUG=none TEST=Compile/unit_tests Review URL: http://codereview.chromium.org/3173017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56202 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/cocoa/preferences_window_controller.mm10
-rw-r--r--chrome/browser/dom_ui/advanced_options_utils_mac.mm11
2 files changed, 9 insertions, 12 deletions
diff --git a/chrome/browser/cocoa/preferences_window_controller.mm b/chrome/browser/cocoa/preferences_window_controller.mm
index e4f45ac..b7a56c0 100644
--- a/chrome/browser/cocoa/preferences_window_controller.mm
+++ b/chrome/browser/cocoa/preferences_window_controller.mm
@@ -11,6 +11,7 @@
#include "app/resource_bundle.h"
#include "base/logging.h"
#include "base/mac_util.h"
+#include "base/scoped_aedesc.h"
#include "base/string16.h"
#include "base/string_util.h"
#include "base/sys_string_conversions.h"
@@ -1456,21 +1457,18 @@ const int kDisabledIndex = 1;
@"/System/Library/PreferencePanes/Network.prefPane"]];
const char* proxyPrefCommand = "Proxies";
- AEDesc openParams = { typeNull, NULL };
+ scoped_aedesc<> openParams;
OSStatus status = AECreateDesc('ptru',
proxyPrefCommand,
strlen(proxyPrefCommand),
- &openParams);
+ openParams.OutPointer());
LOG_IF(ERROR, status != noErr) << "Failed to create open params: " << status;
LSLaunchURLSpec launchSpec = { 0 };
launchSpec.itemURLs = (CFArrayRef)itemsToOpen;
- launchSpec.passThruParams = &openParams;
+ launchSpec.passThruParams = openParams;
launchSpec.launchFlags = kLSLaunchAsync | kLSLaunchDontAddToRecents;
LSOpenFromURLSpec(&launchSpec, NULL);
-
- if (openParams.descriptorType != typeNull)
- AEDisposeDesc(&openParams);
}
// Returns whether the alternate error page checkbox should be checked based
diff --git a/chrome/browser/dom_ui/advanced_options_utils_mac.mm b/chrome/browser/dom_ui/advanced_options_utils_mac.mm
index 51bede2..0557df4 100644
--- a/chrome/browser/dom_ui/advanced_options_utils_mac.mm
+++ b/chrome/browser/dom_ui/advanced_options_utils_mac.mm
@@ -5,7 +5,9 @@
#import <Cocoa/Cocoa.h>
#include "chrome/browser/dom_ui/advanced_options_utils.h"
+
#include "base/logging.h"
+#include "base/scoped_aedesc.h"
void AdvancedOptionsUtilities::ShowNetworkProxySettings(
TabContents* tab_contents) {
@@ -13,21 +15,18 @@ void AdvancedOptionsUtilities::ShowNetworkProxySettings(
@"/System/Library/PreferencePanes/Network.prefPane"]];
const char* proxyPrefCommand = "Proxies";
- AEDesc openParams = { typeNull, NULL };
+ scoped_aedesc<> openParams;
OSStatus status = AECreateDesc('ptru',
proxyPrefCommand,
strlen(proxyPrefCommand),
- &openParams);
+ openParams.OutPointer());
LOG_IF(ERROR, status != noErr) << "Failed to create open params: " << status;
LSLaunchURLSpec launchSpec = { 0 };
launchSpec.itemURLs = (CFArrayRef)itemsToOpen;
- launchSpec.passThruParams = &openParams;
+ launchSpec.passThruParams = openParams;
launchSpec.launchFlags = kLSLaunchAsync | kLSLaunchDontAddToRecents;
LSOpenFromURLSpec(&launchSpec, NULL);
-
- if (openParams.descriptorType != typeNull)
- AEDisposeDesc(&openParams);
}
void AdvancedOptionsUtilities::ShowManageSSLCertificates(