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

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

Issue 9814030: get rid of old options pages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more fixes Created 8 years, 9 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/options/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 void AdvancedOptionsUtilities::ShowNetworkProxySettings(
16 WebContents* web_contents) {
17 NSArray* itemsToOpen = [NSArray arrayWithObject:[NSURL fileURLWithPath:
18 @"/System/Library/PreferencePanes/Network.prefPane"]];
19
20 const char* proxyPrefCommand = "Proxies";
21 base::mac::ScopedAEDesc<> openParams;
22 OSStatus status = AECreateDesc('ptru',
23 proxyPrefCommand,
24 strlen(proxyPrefCommand),
25 openParams.OutPointer());
26 OSSTATUS_LOG_IF(ERROR, status != noErr, status)
27 << "Failed to create open params";
28
29 LSLaunchURLSpec launchSpec = { 0 };
30 launchSpec.itemURLs = (CFArrayRef)itemsToOpen;
31 launchSpec.passThruParams = openParams;
32 launchSpec.launchFlags = kLSLaunchAsync | kLSLaunchDontAddToRecents;
33 LSOpenFromURLSpec(&launchSpec, NULL);
34 }
35
36 void AdvancedOptionsUtilities::ShowManageSSLCertificates(
37 WebContents* web_contents) {
38 NSString* const kKeychainBundleId = @"com.apple.keychainaccess";
39 [[NSWorkspace sharedWorkspace]
40 launchAppWithBundleIdentifier:kKeychainBundleId
41 options:0L
42 additionalEventParamDescriptor:nil
43 launchIdentifier:nil];
44 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698