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

Side by Side Diff: chrome/browser/ui/webui/options2/advanced_options_utils_mac.mm

Issue 8895023: Options2: Pull the trigger. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: DIAF. Created 9 years 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #import <Cocoa/Cocoa.h>
6
7 #include "chrome/browser/ui/webui/options2/advanced_options_utils.h"
8
9 #include "base/logging.h"
10 #include "base/mac/scoped_aedesc.h"
11
12 void AdvancedOptionsUtilities::ShowNetworkProxySettings(
13 TabContents* tab_contents) {
14 NSArray* itemsToOpen = [NSArray arrayWithObject:[NSURL fileURLWithPath:
15 @"/System/Library/PreferencePanes/Network.prefPane"]];
16
17 const char* proxyPrefCommand = "Proxies";
18 base::mac::ScopedAEDesc<> openParams;
19 OSStatus status = AECreateDesc('ptru',
20 proxyPrefCommand,
21 strlen(proxyPrefCommand),
22 openParams.OutPointer());
23 LOG_IF(ERROR, status != noErr) << "Failed to create open params: " << status;
24
25 LSLaunchURLSpec launchSpec = { 0 };
26 launchSpec.itemURLs = (CFArrayRef)itemsToOpen;
27 launchSpec.passThruParams = openParams;
28 launchSpec.launchFlags = kLSLaunchAsync | kLSLaunchDontAddToRecents;
29 LSOpenFromURLSpec(&launchSpec, NULL);
30 }
31
32 void AdvancedOptionsUtilities::ShowManageSSLCertificates(
33 TabContents* tab_contents) {
34 NSString* const kKeychainBundleId = @"com.apple.keychainaccess";
35 [[NSWorkspace sharedWorkspace]
36 launchAppWithBundleIdentifier:kKeychainBundleId
37 options:0L
38 additionalEventParamDescriptor:nil
39 launchIdentifier:nil];
40 }
41
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698