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

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

Issue 10837331: Options: s/options2/options/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: wut Created 8 years, 4 months 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) 2012 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/mac_logging.h"
11 #include "base/mac/scoped_aedesc.h"
12
13 using content::WebContents;
14
15 namespace options {
16
17 void AdvancedOptionsUtilities::ShowNetworkProxySettings(
18 WebContents* web_contents) {
19 NSArray* itemsToOpen = [NSArray arrayWithObject:[NSURL fileURLWithPath:
20 @"/System/Library/PreferencePanes/Network.prefPane"]];
21
22 const char* proxyPrefCommand = "Proxies";
23 base::mac::ScopedAEDesc<> openParams;
24 OSStatus status = AECreateDesc('ptru',
25 proxyPrefCommand,
26 strlen(proxyPrefCommand),
27 openParams.OutPointer());
28 OSSTATUS_LOG_IF(ERROR, status != noErr, status)
29 << "Failed to create open params";
30
31 LSLaunchURLSpec launchSpec = { 0 };
32 launchSpec.itemURLs = (CFArrayRef)itemsToOpen;
33 launchSpec.passThruParams = openParams;
34 launchSpec.launchFlags = kLSLaunchAsync | kLSLaunchDontAddToRecents;
35 LSOpenFromURLSpec(&launchSpec, NULL);
36 }
37
38 void AdvancedOptionsUtilities::ShowManageSSLCertificates(
39 WebContents* web_contents) {
40 NSString* const kKeychainBundleId = @"com.apple.keychainaccess";
41 [[NSWorkspace sharedWorkspace]
42 launchAppWithBundleIdentifier:kKeychainBundleId
43 options:0L
44 additionalEventParamDescriptor:nil
45 launchIdentifier:nil];
46 }
47
48 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698