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

Side by Side Diff: chrome/browser/shell_integration_mac.mm

Issue 817153002: Switch users of foundation_util.h to include it directly and clean up uses of mac_util.h. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
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 "chrome/browser/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"
9 #include "base/mac/foundation_util.h" 8 #include "base/mac/foundation_util.h"
10 #include "chrome/common/chrome_version_info.h" 9 #include "chrome/common/chrome_version_info.h"
11 #import "third_party/mozilla/NSWorkspace+Utils.h" 10 #import "third_party/mozilla/NSWorkspace+Utils.h"
12 11
13 ShellIntegration::DefaultWebClientSetPermission 12 ShellIntegration::DefaultWebClientSetPermission
14 ShellIntegration::CanSetAsDefaultBrowser() { 13 ShellIntegration::CanSetAsDefaultBrowser() {
15 if (chrome::VersionInfo::GetChannel() != 14 if (chrome::VersionInfo::GetChannel() !=
16 chrome::VersionInfo::CHANNEL_CANARY) { 15 chrome::VersionInfo::CHANNEL_CANARY) {
17 return SET_DEFAULT_UNATTENDED; 16 return SET_DEFAULT_UNATTENDED;
18 } 17 }
(...skipping 106 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 124 // We really do want the main bundle here since it makes sense to set an
126 // app shortcut as a default protocol handler. 125 // app shortcut as a default protocol handler.
127 NSString* my_identifier = [base::mac::MainBundle() bundleIdentifier]; 126 NSString* my_identifier = [base::mac::MainBundle() bundleIdentifier];
128 if (!my_identifier) 127 if (!my_identifier)
129 return UNKNOWN_DEFAULT; 128 return UNKNOWN_DEFAULT;
130 129
131 NSString* protocol_ns = [NSString stringWithUTF8String:protocol.c_str()]; 130 NSString* protocol_ns = [NSString stringWithUTF8String:protocol.c_str()];
132 return IsIdentifierDefaultProtocolClient(my_identifier, protocol_ns) ? 131 return IsIdentifierDefaultProtocolClient(my_identifier, protocol_ns) ?
133 IS_DEFAULT : NOT_DEFAULT; 132 IS_DEFAULT : NOT_DEFAULT;
134 } 133 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698