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

Side by Side Diff: apps/shell_integration_mac.mm

Issue 12321107: Move shell integration code from chrome/browser to apps (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/shell_integration.h" 5 #include "apps/shell_integration.h"
6 6
7 #include "base/mac/bundle_locations.h" 7 #include "base/mac/bundle_locations.h"
8 #include "base/mac/mac_util.h" 8 #include "base/mac/mac_util.h"
9 #include "base/mac/foundation_util.h" 9 #include "base/mac/foundation_util.h"
10 #include "chrome/common/chrome_version_info.h" 10 #include "chrome/common/chrome_version_info.h"
11 #import "third_party/mozilla/NSWorkspace+Utils.h" 11 #import "third_party/mozilla/NSWorkspace+Utils.h"
12 12
13 ShellIntegration::DefaultWebClientSetPermission 13 ShellIntegration::DefaultWebClientSetPermission
14 ShellIntegration::CanSetAsDefaultBrowser() { 14 ShellIntegration::CanSetAsDefaultBrowser() {
15 if (chrome::VersionInfo::GetChannel() != 15 if (chrome::VersionInfo::GetChannel() !=
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 // We really do want the main bundle here since it makes sense to set an 125 // We really do want the main bundle here since it makes sense to set an
126 // app shortcut as a default protocol handler. 126 // app shortcut as a default protocol handler.
127 NSString* my_identifier = [base::mac::MainBundle() bundleIdentifier]; 127 NSString* my_identifier = [base::mac::MainBundle() bundleIdentifier];
128 if (!my_identifier) 128 if (!my_identifier)
129 return UNKNOWN_DEFAULT; 129 return UNKNOWN_DEFAULT;
130 130
131 NSString* protocol_ns = [NSString stringWithUTF8String:protocol.c_str()]; 131 NSString* protocol_ns = [NSString stringWithUTF8String:protocol.c_str()];
132 return IsIdentifierDefaultProtocolClient(my_identifier, protocol_ns) ? 132 return IsIdentifierDefaultProtocolClient(my_identifier, protocol_ns) ?
133 IS_DEFAULT : NOT_DEFAULT; 133 IS_DEFAULT : NOT_DEFAULT;
134 } 134 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698