diff options
author | binji@chromium.org <binji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-20 01:17:49 +0000 |
---|---|---|
committer | binji@chromium.org <binji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-20 01:17:49 +0000 |
commit | 3d750ef7aaedd4a6cede734e3251005f2e02dcc0 (patch) | |
tree | 0c0dbe4db6ff6cc66bd9b9f04c34ec933f6ea577 /chrome/browser/ui/webui/options2/advanced_options_utils2_mac.mm | |
parent | 81a33d9d44aa5eedb06670952165c55533a0ed5a (diff) | |
download | chromium_src-3d750ef7aaedd4a6cede734e3251005f2e02dcc0.zip chromium_src-3d750ef7aaedd4a6cede734e3251005f2e02dcc0.tar.gz chromium_src-3d750ef7aaedd4a6cede734e3251005f2e02dcc0.tar.bz2 |
Moved all options2 files to the options2 namespace.
BUG=100885
TEST=everything compiles
Review URL: http://codereview.chromium.org/8947010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115057 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/webui/options2/advanced_options_utils2_mac.mm')
-rw-r--r-- | chrome/browser/ui/webui/options2/advanced_options_utils2_mac.mm | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/chrome/browser/ui/webui/options2/advanced_options_utils2_mac.mm b/chrome/browser/ui/webui/options2/advanced_options_utils2_mac.mm new file mode 100644 index 0000000..8f2c174 --- /dev/null +++ b/chrome/browser/ui/webui/options2/advanced_options_utils2_mac.mm @@ -0,0 +1,44 @@ +// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import <Cocoa/Cocoa.h> + +#include "chrome/browser/ui/webui/options2/advanced_options_utils2.h" + +#include "base/logging.h" +#include "base/mac/scoped_aedesc.h" + +namespace options2 { + +void AdvancedOptionsUtilities::ShowNetworkProxySettings( + TabContents* tab_contents) { + NSArray* itemsToOpen = [NSArray arrayWithObject:[NSURL fileURLWithPath: + @"/System/Library/PreferencePanes/Network.prefPane"]]; + + const char* proxyPrefCommand = "Proxies"; + base::mac::ScopedAEDesc<> openParams; + OSStatus status = AECreateDesc('ptru', + proxyPrefCommand, + strlen(proxyPrefCommand), + openParams.OutPointer()); + LOG_IF(ERROR, status != noErr) << "Failed to create open params: " << status; + + LSLaunchURLSpec launchSpec = { 0 }; + launchSpec.itemURLs = (CFArrayRef)itemsToOpen; + launchSpec.passThruParams = openParams; + launchSpec.launchFlags = kLSLaunchAsync | kLSLaunchDontAddToRecents; + LSOpenFromURLSpec(&launchSpec, NULL); +} + +void AdvancedOptionsUtilities::ShowManageSSLCertificates( + TabContents* tab_contents) { + NSString* const kKeychainBundleId = @"com.apple.keychainaccess"; + [[NSWorkspace sharedWorkspace] + launchAppWithBundleIdentifier:kKeychainBundleId + options:0L + additionalEventParamDescriptor:nil + launchIdentifier:nil]; +} + +} // namespace options2 |