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

Side by Side Diff: mac/foundation_util.h

Issue 2050803003: Update to Chromium //base at Chromium commit e3a753f17bac62738b0dbf0b36510f767b081e4b. (Closed) Base URL: https://github.com/domokit/base.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « logging.cc ('k') | mac/foundation_util.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7
8 #include <CoreFoundation/CoreFoundation.h> 8 #include <CoreFoundation/CoreFoundation.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 366
367 return value_specific; 367 return value_specific;
368 } 368 }
369 369
370 // Converts |path| to an autoreleased NSString. Returns nil if |path| is empty. 370 // Converts |path| to an autoreleased NSString. Returns nil if |path| is empty.
371 BASE_EXPORT NSString* FilePathToNSString(const FilePath& path); 371 BASE_EXPORT NSString* FilePathToNSString(const FilePath& path);
372 372
373 // Converts |str| to a FilePath. Returns an empty path if |str| is nil. 373 // Converts |str| to a FilePath. Returns an empty path if |str| is nil.
374 BASE_EXPORT FilePath NSStringToFilePath(NSString* str); 374 BASE_EXPORT FilePath NSStringToFilePath(NSString* str);
375 375
376 #if defined(__OBJC__)
377 // Converts |range| to an NSRange, returning the new range in |range_out|.
378 // Returns true if conversion was successful, false if the values of |range|
379 // could not be converted to NSUIntegers.
380 BASE_EXPORT bool CFRangeToNSRange(CFRange range,
381 NSRange* range_out) WARN_UNUSED_RESULT;
382 #endif // defined(__OBJC__)
383
376 } // namespace mac 384 } // namespace mac
377 } // namespace base 385 } // namespace base
378 386
379 // Stream operations for CFTypes. They can be used with NSTypes as well 387 // Stream operations for CFTypes. They can be used with NSTypes as well
380 // by using the NSToCFCast methods above. 388 // by using the NSToCFCast methods above.
381 // e.g. LOG(INFO) << base::mac::NSToCFCast(@"foo"); 389 // e.g. LOG(INFO) << base::mac::NSToCFCast(@"foo");
382 // Operator << can not be overloaded for ObjectiveC types as the compiler 390 // Operator << can not be overloaded for ObjectiveC types as the compiler
383 // can not distinguish between overloads for id with overloads for void*. 391 // can not distinguish between overloads for id with overloads for void*.
384 BASE_EXPORT extern std::ostream& operator<<(std::ostream& o, 392 BASE_EXPORT extern std::ostream& operator<<(std::ostream& o,
385 const CFErrorRef err); 393 const CFErrorRef err);
386 BASE_EXPORT extern std::ostream& operator<<(std::ostream& o, 394 BASE_EXPORT extern std::ostream& operator<<(std::ostream& o,
387 const CFStringRef str); 395 const CFStringRef str);
388 396
389 #endif // BASE_MAC_FOUNDATION_UTIL_H_ 397 #endif // BASE_MAC_FOUNDATION_UTIL_H_
OLDNEW
« no previous file with comments | « logging.cc ('k') | mac/foundation_util.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698