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

Unified Diff: ios/web/navigation/crw_session_entry_unittest.mm

Issue 2690913003: Revert "Updated ownership of NavigationItems within CRWSessionController." (Closed)
Patch Set: Revert olivier's CLs Created 3 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
« no previous file with comments | « ios/web/navigation/crw_session_entry.mm ('k') | ios/web/navigation/navigation_item_impl_list.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/navigation/crw_session_entry_unittest.mm
diff --git a/ios/web/navigation/crw_session_entry_unittest.mm b/ios/web/navigation/crw_session_entry_unittest.mm
index 9c0f05faf55d6829fc7dc1ee072552f8b9e14c76..a5b932392390bdd31194fbc5619330b78f3f81d5 100644
--- a/ios/web/navigation/crw_session_entry_unittest.mm
+++ b/ios/web/navigation/crw_session_entry_unittest.mm
@@ -33,18 +33,18 @@ void SetUp() override {
GURL url("http://init.test");
ui::PageTransition transition =
ui::PAGE_TRANSITION_AUTO_BOOKMARK;
- item_.reset(new web::NavigationItemImpl());
- item_->SetOriginalRequestURL(url);
- item_->SetURL(url);
- item_->SetTransitionType(transition);
- item_->SetTimestamp(base::Time::Now());
- item_->SetPostData([@"Test data" dataUsingEncoding:NSUTF8StringEncoding]);
+ std::unique_ptr<web::NavigationItemImpl> item(
+ new web::NavigationItemImpl());
+ item->SetOriginalRequestURL(url);
+ item->SetURL(url);
+ item->SetTransitionType(transition);
+ item->SetTimestamp(base::Time::Now());
+ item->SetPostData([@"Test data" dataUsingEncoding:NSUTF8StringEncoding]);
session_entry_.reset(
- [[CRWSessionEntry alloc] initWithNavigationItem:item_.get()]);
+ [[CRWSessionEntry alloc] initWithNavigationItem:std::move(item)]);
}
protected:
- std::unique_ptr<web::NavigationItemImpl> item_;
base::scoped_nsobject<CRWSessionEntry> session_entry_;
};
« no previous file with comments | « ios/web/navigation/crw_session_entry.mm ('k') | ios/web/navigation/navigation_item_impl_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698