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

Side by Side Diff: chrome/browser/ui/toolbar/recent_tabs_sub_menu_model_unittest.cc

Issue 2251263003: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 3 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 #include "chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.h" 5 #include "chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 std::unique_ptr<syncer::SyncErrorFactory>( 143 std::unique_ptr<syncer::SyncErrorFactory>(
144 new syncer::SyncErrorFactoryMock)); 144 new syncer::SyncErrorFactoryMock));
145 } 145 }
146 146
147 void WaitForLoadFromLastSession() { 147 void WaitForLoadFromLastSession() {
148 content::RunAllBlockingPoolTasksUntilIdle(); 148 content::RunAllBlockingPoolTasksUntilIdle();
149 } 149 }
150 150
151 static std::unique_ptr<KeyedService> GetTabRestoreService( 151 static std::unique_ptr<KeyedService> GetTabRestoreService(
152 content::BrowserContext* browser_context) { 152 content::BrowserContext* browser_context) {
153 return base::WrapUnique(new sessions::PersistentTabRestoreService( 153 return base::MakeUnique<sessions::PersistentTabRestoreService>(
154 base::WrapUnique(new ChromeTabRestoreServiceClient( 154 base::WrapUnique(new ChromeTabRestoreServiceClient(
155 Profile::FromBrowserContext(browser_context))), 155 Profile::FromBrowserContext(browser_context))),
156 nullptr)); 156 nullptr);
157 } 157 }
158 158
159 sync_driver::OpenTabsUIDelegate* GetOpenTabsDelegate() { 159 sync_driver::OpenTabsUIDelegate* GetOpenTabsDelegate() {
160 return manager_.get(); 160 return manager_.get();
161 } 161 }
162 162
163 void RegisterRecentTabs(RecentTabsBuilderTestHelper* helper) { 163 void RegisterRecentTabs(RecentTabsBuilderTestHelper* helper) {
164 helper->ExportToSessionsSyncManager(manager_.get()); 164 helper->ExportToSessionsSyncManager(manager_.get());
165 } 165 }
166 166
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 // 2 Recently closed heaer (disabled) 607 // 2 Recently closed heaer (disabled)
608 // 3 <separator> 608 // 3 <separator>
609 // 4 No tabs from other Devices 609 // 4 No tabs from other Devices
610 610
611 TestRecentTabsSubMenuModel model(NULL, browser(), NULL); 611 TestRecentTabsSubMenuModel model(NULL, browser(), NULL);
612 EXPECT_EQ(5, model.GetItemCount()); 612 EXPECT_EQ(5, model.GetItemCount());
613 EXPECT_EQ(-1, model.GetMaxWidthForItemAtIndex(2)); 613 EXPECT_EQ(-1, model.GetMaxWidthForItemAtIndex(2));
614 EXPECT_NE(-1, model.GetMaxWidthForItemAtIndex(3)); 614 EXPECT_NE(-1, model.GetMaxWidthForItemAtIndex(3));
615 EXPECT_EQ(-1, model.GetMaxWidthForItemAtIndex(4)); 615 EXPECT_EQ(-1, model.GetMaxWidthForItemAtIndex(4));
616 } 616 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/tabs/pinned_tab_service_unittest.cc ('k') | chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698