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

Unified Diff: ios/chrome/browser/ui/toolbar/toolbar_model_impl_ios_unittest.mm

Issue 2775623002: [ios] WebStateList owns all WebState it manages. (Closed)
Patch Set: Fix gn check 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/toolbar/toolbar_model_impl_ios_unittest.mm
diff --git a/ios/chrome/browser/ui/toolbar/toolbar_model_impl_ios_unittest.mm b/ios/chrome/browser/ui/toolbar/toolbar_model_impl_ios_unittest.mm
index 588dd944b01e0e520f5716dd60347521e6c39055..8d5b4fa7585e6fe6a68d45754f3ec2a8e925dfcf 100644
--- a/ios/chrome/browser/ui/toolbar/toolbar_model_impl_ios_unittest.mm
+++ b/ios/chrome/browser/ui/toolbar/toolbar_model_impl_ios_unittest.mm
@@ -84,13 +84,12 @@ class ToolbarModelImplIOSTest : public PlatformTest {
// Create a WebStateList that will always return the test WebState as
// the active WebState.
- web_state_list_ = base::MakeUnique<WebStateList>(
- &web_state_list_delegate_, WebStateList::WebStateOwned);
+ web_state_list_ = base::MakeUnique<WebStateList>(&web_state_list_delegate_);
std::unique_ptr<ToolbarTestWebState> web_state =
base::MakeUnique<ToolbarTestWebState>();
web_state->SetBrowserState(chrome_browser_state_.get());
web_state_ = web_state.get();
- web_state_list_->InsertWebState(0, web_state.release());
+ web_state_list_->InsertWebState(0, std::move(web_state));
web_state_list_->ActivateWebStateAt(0);
toolbarModelDelegate_.reset(

Powered by Google App Engine
This is Rietveld 408576698