| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |