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

Unified Diff: chrome/browser/importer/safari_importer.mm

Issue 6594096: Clean up CF To NS Casts and make them slightly safer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/importer/safari_importer.mm
diff --git a/chrome/browser/importer/safari_importer.mm b/chrome/browser/importer/safari_importer.mm
index de406553e4ea051c1c5e75885f3df82eee9ecbcd..6b2b58ef1fa5bf6534442c34ad138a277c66d4e4 100644
--- a/chrome/browser/importer/safari_importer.mm
+++ b/chrome/browser/importer/safari_importer.mm
@@ -10,6 +10,7 @@
#include <vector>
#include "base/file_util.h"
+#include "base/mac_util.h"
#include "base/message_loop.h"
#include "base/scoped_nsobject.h"
#include "base/string16.h"
@@ -326,7 +327,7 @@ double SafariImporter::HistoryTimeToEpochTime(NSString* history_time) {
// Add Difference between Unix epoch and CFAbsoluteTime epoch in seconds.
// Unix epoch is 1970-01-01 00:00:00.0 UTC,
// CF epoch is 2001-01-01 00:00:00.0 UTC.
- return CFStringGetDoubleValue(reinterpret_cast<CFStringRef>(history_time)) +
+ return CFStringGetDoubleValue(base::mac::NSToCFCast(history_time)) +
kCFAbsoluteTimeIntervalSince1970;
}

Powered by Google App Engine
This is Rietveld 408576698