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

Side by Side Diff: chrome/browser/extensions/extension_web_ui_unittest.cc

Issue 2257113002: 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/extensions/extension_web_ui.h" 5 #include "chrome/browser/extensions/extension_web_ui.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 14 matching lines...) Expand all
25 #include "chrome/browser/chromeos/settings/cros_settings.h" 25 #include "chrome/browser/chromeos/settings/cros_settings.h"
26 #include "chrome/browser/chromeos/settings/device_settings_service.h" 26 #include "chrome/browser/chromeos/settings/device_settings_service.h"
27 #endif 27 #endif
28 28
29 namespace extensions { 29 namespace extensions {
30 30
31 namespace { 31 namespace {
32 32
33 std::unique_ptr<KeyedService> BuildOverrideRegistrar( 33 std::unique_ptr<KeyedService> BuildOverrideRegistrar(
34 content::BrowserContext* context) { 34 content::BrowserContext* context) {
35 return base::WrapUnique(new ExtensionWebUIOverrideRegistrar(context)); 35 return base::MakeUnique<ExtensionWebUIOverrideRegistrar>(context);
36 } 36 }
37 37
38 } // namespace 38 } // namespace
39 39
40 class ExtensionWebUITest : public testing::Test { 40 class ExtensionWebUITest : public testing::Test {
41 public: 41 public:
42 ExtensionWebUITest() 42 ExtensionWebUITest()
43 : ui_thread_(content::BrowserThread::UI, &message_loop_) {} 43 : ui_thread_(content::BrowserThread::UI, &message_loop_) {}
44 44
45 protected: 45 protected:
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 changed_url = kBookmarksUrl; 155 changed_url = kBookmarksUrl;
156 EXPECT_TRUE( 156 EXPECT_TRUE(
157 ExtensionWebUI::HandleChromeURLOverride(&changed_url, profile_.get())); 157 ExtensionWebUI::HandleChromeURLOverride(&changed_url, profile_.get()));
158 EXPECT_EQ(kExpectedUnpackedOverrideUrl, changed_url); 158 EXPECT_EQ(kExpectedUnpackedOverrideUrl, changed_url);
159 EXPECT_TRUE(ExtensionWebUI::HandleChromeURLOverrideReverse(&changed_url, 159 EXPECT_TRUE(ExtensionWebUI::HandleChromeURLOverrideReverse(&changed_url,
160 profile_.get())); 160 profile_.get()));
161 EXPECT_EQ(kBookmarksUrl, changed_url); 161 EXPECT_EQ(kBookmarksUrl, changed_url);
162 } 162 }
163 163
164 } // namespace extensions 164 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_service_unittest.cc ('k') | chrome/browser/extensions/menu_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698