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

Side by Side Diff: chrome/test/base/test_browser_window.cc

Issue 2341693002: Re-write many calls to WrapUnique() with MakeUnique() (Closed)
Patch Set: Change std::string() back to "" to fix compile 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
« no previous file with comments | « chrome/test/base/chrome_render_view_test.cc ('k') | chrome/test/base/testing_profile.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/test/base/test_browser_window.h" 5 #include "chrome/test/base/test_browser_window.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "chrome/browser/ui/browser_list.h" 9 #include "chrome/browser/ui/browser_list.h"
10 #include "chrome/browser/ui/browser_list_observer.h" 10 #include "chrome/browser/ui/browser_list_observer.h"
11 #include "ui/gfx/geometry/rect.h" 11 #include "ui/gfx/geometry/rect.h"
12 12
13 13
14 // Helpers -------------------------------------------------------------------- 14 // Helpers --------------------------------------------------------------------
15 15
16 namespace chrome { 16 namespace chrome {
17 17
18 std::unique_ptr<Browser> CreateBrowserWithTestWindowForParams( 18 std::unique_ptr<Browser> CreateBrowserWithTestWindowForParams(
19 Browser::CreateParams* params) { 19 Browser::CreateParams* params) {
20 TestBrowserWindow* window = new TestBrowserWindow; 20 TestBrowserWindow* window = new TestBrowserWindow;
21 new TestBrowserWindowOwner(window); 21 new TestBrowserWindowOwner(window);
22 params->window = window; 22 params->window = window;
23 return base::WrapUnique(new Browser(*params)); 23 return base::MakeUnique<Browser>(*params);
24 } 24 }
25 25
26 } // namespace chrome 26 } // namespace chrome
27 27
28 28
29 // TestBrowserWindow::TestLocationBar ----------------------------------------- 29 // TestBrowserWindow::TestLocationBar -----------------------------------------
30 30
31 GURL TestBrowserWindow::TestLocationBar::GetDestinationURL() const { 31 GURL TestBrowserWindow::TestLocationBar::GetDestinationURL() const {
32 return GURL(); 32 return GURL();
33 } 33 }
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 } 210 }
211 211
212 TestBrowserWindowOwner::~TestBrowserWindowOwner() { 212 TestBrowserWindowOwner::~TestBrowserWindowOwner() {
213 BrowserList::RemoveObserver(this); 213 BrowserList::RemoveObserver(this);
214 } 214 }
215 215
216 void TestBrowserWindowOwner::OnBrowserRemoved(Browser* browser) { 216 void TestBrowserWindowOwner::OnBrowserRemoved(Browser* browser) {
217 if (browser->window() == window_.get()) 217 if (browser->window() == window_.get())
218 delete this; 218 delete this;
219 } 219 }
OLDNEW
« no previous file with comments | « chrome/test/base/chrome_render_view_test.cc ('k') | chrome/test/base/testing_profile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698