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

Side by Side Diff: base/mac/foundation_util.h

Issue 9346013: Publish app shortcuts on Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address review comments Created 8 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 #ifndef BASE_MAC_FOUNDATION_UTIL_H_ 5 #ifndef BASE_MAC_FOUNDATION_UTIL_H_
6 #define BASE_MAC_FOUNDATION_UTIL_H_ 6 #define BASE_MAC_FOUNDATION_UTIL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <CoreFoundation/CoreFoundation.h> 9 #include <CoreFoundation/CoreFoundation.h>
10 10
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 if (value && !value_specific) { 282 if (value && !value_specific) {
283 std::string expected_type = TypeNameForCFType(value_specific); 283 std::string expected_type = TypeNameForCFType(value_specific);
284 DLOG(WARNING) << GetValueFromDictionaryErrorMessage(key, 284 DLOG(WARNING) << GetValueFromDictionaryErrorMessage(key,
285 expected_type, 285 expected_type,
286 value); 286 value);
287 } 287 }
288 288
289 return value_specific; 289 return value_specific;
290 } 290 }
291 291
292 // Converts |path| to an autoreleased NSString. Returns nil if |path| is empty.
293 NSString* FilePathToNSString(const FilePath& path);
294
295 // Converts |str| to a FilePath.
jeremy 2012/02/08 09:10:45 Add to comment: if |str| is nil then an empty file
sail 2012/02/08 19:09:15 Done.
296 FilePath NSStringToFilePath(NSString* str);
297
292 } // namespace mac 298 } // namespace mac
293 } // namespace base 299 } // namespace base
294 300
295 // Stream operations for CFTypes. They can be used with NSTypes as well 301 // Stream operations for CFTypes. They can be used with NSTypes as well
296 // by using the NSToCFCast methods above. 302 // by using the NSToCFCast methods above.
297 // e.g. LOG(INFO) << base::mac::NSToCFCast(@"foo"); 303 // e.g. LOG(INFO) << base::mac::NSToCFCast(@"foo");
298 // Operator << can not be overloaded for ObjectiveC types as the compiler 304 // Operator << can not be overloaded for ObjectiveC types as the compiler
299 // can not distinguish between overloads for id with overloads for void*. 305 // can not distinguish between overloads for id with overloads for void*.
300 BASE_EXPORT extern std::ostream& operator<<(std::ostream& o, 306 BASE_EXPORT extern std::ostream& operator<<(std::ostream& o,
301 const CFErrorRef err); 307 const CFErrorRef err);
302 BASE_EXPORT extern std::ostream& operator<<(std::ostream& o, 308 BASE_EXPORT extern std::ostream& operator<<(std::ostream& o,
303 const CFStringRef str); 309 const CFStringRef str);
304 310
305 #endif // BASE_MAC_FOUNDATION_UTIL_H_ 311 #endif // BASE_MAC_FOUNDATION_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698