| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |