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

Unified Diff: ios/chrome/browser/ui/tab_switcher/tab_model_snapshot.mm

Issue 2810193002: [ObjC ARC] Converts ios/chrome/browser/ui/tab_switcher:tab_switcher to ARC. (Closed)
Patch Set: cast Created 3 years, 8 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: ios/chrome/browser/ui/tab_switcher/tab_model_snapshot.mm
diff --git a/ios/chrome/browser/ui/tab_switcher/tab_model_snapshot.mm b/ios/chrome/browser/ui/tab_switcher/tab_model_snapshot.mm
index 3296d9d8f1da2ca8ae0b48706e3d8e90fee87e78..b7f86cce44d75d7e14a1c8eb85b1116328c1c444 100644
--- a/ios/chrome/browser/ui/tab_switcher/tab_model_snapshot.mm
+++ b/ios/chrome/browser/ui/tab_switcher/tab_model_snapshot.mm
@@ -6,6 +6,11 @@
#include "base/strings/sys_string_conversions.h"
#import "ios/chrome/browser/tabs/tab.h"
+#import "ios/chrome/browser/tabs/tab_model.h"
+
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
TabModelSnapshot::TabModelSnapshot(TabModel* tabModel) {
for (Tab* tab in tabModel) {
@@ -31,7 +36,7 @@ size_t TabModelSnapshot::hashOfTheVisiblePropertiesOfATab(Tab* tab) {
std::stringstream ss;
// lastVisitedTimestamp is used as an approximation for whether the tab's
// snapshot changed.
- ss << tab.tabId << std::endl
+ ss << (__bridge void*)tab.tabId << std::endl
sdefresne 2017/05/02 14:23:11 This should be "base::SysNSStringToUTF8(tab.tabId)
stkhapugin 2017/05/02 14:40:28 Done.
<< base::SysNSStringToUTF8(tab.urlDisplayString) << std::endl
<< std::hexfloat << tab.lastVisitedTimestamp << std::endl;
return std::hash<std::string>()(ss.str());
« no previous file with comments | « ios/chrome/browser/ui/tab_switcher/BUILD.gn ('k') | ios/chrome/browser/ui/tab_switcher/tab_switcher_button.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698