Commit 318708b8 authored by Lei Zhang's avatar Lei Zhang Committed by Commit Bot

Change CreateWebUIControllerForURL() to return a unique_ptr.

In WebUIControllerFactory and subclasses.

Change-Id: I93f7d17265bfb77f402eef4bd08566614393b21c
Reviewed-on: https://chromium-review.googlesource.com/1087627Reviewed-by: default avatarBo <boliu@chromium.org>
Reviewed-by: default avatarDmitry Gozman <dgozman@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#565142}
parent 16c0e6d7
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include "android_webview/browser/aw_web_ui_controller_factory.h" #include "android_webview/browser/aw_web_ui_controller_factory.h"
#include "base/memory/ptr_util.h"
#include "components/safe_browsing/web_ui/constants.h" #include "components/safe_browsing/web_ui/constants.h"
#include "components/safe_browsing/web_ui/safe_browsing_ui.h" #include "components/safe_browsing/web_ui/safe_browsing_ui.h"
#include "content/public/browser/web_ui.h" #include "content/public/browser/web_ui.h"
...@@ -73,14 +74,14 @@ bool AwWebUIControllerFactory::UseWebUIBindingsForURL( ...@@ -73,14 +74,14 @@ bool AwWebUIControllerFactory::UseWebUIBindingsForURL(
return UseWebUIForURL(browser_context, url); return UseWebUIForURL(browser_context, url);
} }
WebUIController* AwWebUIControllerFactory::CreateWebUIControllerForURL( std::unique_ptr<WebUIController>
WebUI* web_ui, AwWebUIControllerFactory::CreateWebUIControllerForURL(WebUI* web_ui,
const GURL& url) const { const GURL& url) const {
WebUIFactoryFunctionPointer function = GetWebUIFactoryFunctionPointer(url); WebUIFactoryFunctionPointer function = GetWebUIFactoryFunctionPointer(url);
if (!function) if (!function)
return nullptr; return nullptr;
return (*function)(web_ui, url); return base::WrapUnique((*function)(web_ui, url));
} }
} // namespace android_webview } // namespace android_webview
...@@ -22,7 +22,7 @@ class AwWebUIControllerFactory : public content::WebUIControllerFactory { ...@@ -22,7 +22,7 @@ class AwWebUIControllerFactory : public content::WebUIControllerFactory {
const GURL& url) const override; const GURL& url) const override;
bool UseWebUIBindingsForURL(content::BrowserContext* browser_context, bool UseWebUIBindingsForURL(content::BrowserContext* browser_context,
const GURL& url) const override; const GURL& url) const override;
content::WebUIController* CreateWebUIControllerForURL( std::unique_ptr<content::WebUIController> CreateWebUIControllerForURL(
content::WebUI* web_ui, content::WebUI* web_ui,
const GURL& url) const override; const GURL& url) const override;
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include "base/bind.h" #include "base/bind.h"
#include "base/feature_list.h" #include "base/feature_list.h"
#include "base/location.h" #include "base/location.h"
#include "base/memory/ptr_util.h"
#include "base/threading/thread_task_runner_handle.h" #include "base/threading/thread_task_runner_handle.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "chrome/browser/about_flags.h" #include "chrome/browser/about_flags.h"
...@@ -681,18 +682,19 @@ bool ChromeWebUIControllerFactory::UseWebUIBindingsForURL( ...@@ -681,18 +682,19 @@ bool ChromeWebUIControllerFactory::UseWebUIBindingsForURL(
return UseWebUIForURL(browser_context, url); return UseWebUIForURL(browser_context, url);
} }
WebUIController* ChromeWebUIControllerFactory::CreateWebUIControllerForURL( std::unique_ptr<WebUIController>
ChromeWebUIControllerFactory::CreateWebUIControllerForURL(
WebUI* web_ui, WebUI* web_ui,
const GURL& url) const { const GURL& url) const {
Profile* profile = Profile::FromWebUI(web_ui); Profile* profile = Profile::FromWebUI(web_ui);
WebUIFactoryFunction function = GetWebUIFactoryFunction(web_ui, profile, url); WebUIFactoryFunction function = GetWebUIFactoryFunction(web_ui, profile, url);
if (!function) if (!function)
return NULL; return nullptr;
if (web_ui->GetWebContents()->GetMainFrame() != nullptr) if (web_ui->GetWebContents()->GetMainFrame())
webui::LogWebUIUrl(url); webui::LogWebUIUrl(url);
return (*function)(web_ui, url); return base::WrapUnique((*function)(web_ui, url));
} }
void ChromeWebUIControllerFactory::GetFaviconForURL( void ChromeWebUIControllerFactory::GetFaviconForURL(
......
...@@ -20,13 +20,16 @@ class RefCountedMemory; ...@@ -20,13 +20,16 @@ class RefCountedMemory;
class ChromeWebUIControllerFactory : public content::WebUIControllerFactory { class ChromeWebUIControllerFactory : public content::WebUIControllerFactory {
public: public:
static ChromeWebUIControllerFactory* GetInstance();
// content::WebUIControllerFactory:
content::WebUI::TypeID GetWebUIType(content::BrowserContext* browser_context, content::WebUI::TypeID GetWebUIType(content::BrowserContext* browser_context,
const GURL& url) const override; const GURL& url) const override;
bool UseWebUIForURL(content::BrowserContext* browser_context, bool UseWebUIForURL(content::BrowserContext* browser_context,
const GURL& url) const override; const GURL& url) const override;
bool UseWebUIBindingsForURL(content::BrowserContext* browser_context, bool UseWebUIBindingsForURL(content::BrowserContext* browser_context,
const GURL& url) const override; const GURL& url) const override;
content::WebUIController* CreateWebUIControllerForURL( std::unique_ptr<content::WebUIController> CreateWebUIControllerForURL(
content::WebUI* web_ui, content::WebUI* web_ui,
const GURL& url) const override; const GURL& url) const override;
...@@ -38,8 +41,6 @@ class ChromeWebUIControllerFactory : public content::WebUIControllerFactory { ...@@ -38,8 +41,6 @@ class ChromeWebUIControllerFactory : public content::WebUIControllerFactory {
const std::vector<int>& desired_sizes_in_pixel, const std::vector<int>& desired_sizes_in_pixel,
const favicon_base::FaviconResultsCallback& callback) const; const favicon_base::FaviconResultsCallback& callback) const;
static ChromeWebUIControllerFactory* GetInstance();
protected: protected:
ChromeWebUIControllerFactory(); ChromeWebUIControllerFactory();
~ChromeWebUIControllerFactory() override; ~ChromeWebUIControllerFactory() override;
......
...@@ -4,8 +4,10 @@ ...@@ -4,8 +4,10 @@
#include "chrome/test/base/test_chrome_web_ui_controller_factory.h" #include "chrome/test/base/test_chrome_web_ui_controller_factory.h"
#include "base/memory/ptr_util.h"
#include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile.h"
#include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents.h"
#include "content/public/browser/web_ui_controller.h"
using content::WebContents; using content::WebContents;
using content::WebUI; using content::WebUI;
...@@ -40,12 +42,15 @@ WebUI::TypeID TestChromeWebUIControllerFactory::GetWebUIType( ...@@ -40,12 +42,15 @@ WebUI::TypeID TestChromeWebUIControllerFactory::GetWebUIType(
ChromeWebUIControllerFactory::GetWebUIType(profile, url); ChromeWebUIControllerFactory::GetWebUIType(profile, url);
} }
WebUIController* TestChromeWebUIControllerFactory::CreateWebUIControllerForURL( std::unique_ptr<WebUIController>
content::WebUI* web_ui, const GURL& url) const { TestChromeWebUIControllerFactory::CreateWebUIControllerForURL(
content::WebUI* web_ui,
const GURL& url) const {
Profile* profile = Profile::FromWebUI(web_ui); Profile* profile = Profile::FromWebUI(web_ui);
WebUIProvider* provider = GetWebUIProvider(profile, url); WebUIProvider* provider = GetWebUIProvider(profile, url);
return provider ? provider->NewWebUI(web_ui, url) : return provider ? base::WrapUnique(provider->NewWebUI(web_ui, url))
ChromeWebUIControllerFactory::CreateWebUIControllerForURL(web_ui, url); : ChromeWebUIControllerFactory::CreateWebUIControllerForURL(
web_ui, url);
} }
TestChromeWebUIControllerFactory::WebUIProvider* TestChromeWebUIControllerFactory::WebUIProvider*
...@@ -53,5 +58,5 @@ TestChromeWebUIControllerFactory::WebUIProvider* ...@@ -53,5 +58,5 @@ TestChromeWebUIControllerFactory::WebUIProvider*
Profile* profile, const GURL& url) const { Profile* profile, const GURL& url) const {
FactoryOverridesMap::const_iterator found = FactoryOverridesMap::const_iterator found =
factory_overrides_.find(url.host()); factory_overrides_.find(url.host());
return (found == factory_overrides_.end()) ? NULL : found->second; return found != factory_overrides_.end() ? found->second : nullptr;
} }
...@@ -44,7 +44,7 @@ class TestChromeWebUIControllerFactory : public ChromeWebUIControllerFactory { ...@@ -44,7 +44,7 @@ class TestChromeWebUIControllerFactory : public ChromeWebUIControllerFactory {
// ChromeWebUIFactory overrides. // ChromeWebUIFactory overrides.
content::WebUI::TypeID GetWebUIType(content::BrowserContext* browser_context, content::WebUI::TypeID GetWebUIType(content::BrowserContext* browser_context,
const GURL& url) const override; const GURL& url) const override;
content::WebUIController* CreateWebUIControllerForURL( std::unique_ptr<content::WebUIController> CreateWebUIControllerForURL(
content::WebUI* web_ui, content::WebUI* web_ui,
const GURL& url) const override; const GURL& url) const override;
......
...@@ -131,12 +131,13 @@ class RenderFrameHostManagerTestWebUIControllerFactory ...@@ -131,12 +131,13 @@ class RenderFrameHostManagerTestWebUIControllerFactory
} }
// WebUIFactory implementation. // WebUIFactory implementation.
WebUIController* CreateWebUIControllerForURL(WebUI* web_ui, std::unique_ptr<WebUIController> CreateWebUIControllerForURL(
WebUI* web_ui,
const GURL& url) const override { const GURL& url) const override {
// If WebUI creation is enabled for the test and this is a WebUI URL, // If WebUI creation is enabled for the test and this is a WebUI URL,
// returns a new instance. // returns a new instance.
if (should_create_webui_ && HasWebUIScheme(url)) if (should_create_webui_ && HasWebUIScheme(url))
return new WebUIController(web_ui); return std::make_unique<WebUIController>(web_ui);
return nullptr; return nullptr;
} }
......
...@@ -56,12 +56,14 @@ class RenderProcessKilledObserver : public WebContentsObserver { ...@@ -56,12 +56,14 @@ class RenderProcessKilledObserver : public WebContentsObserver {
class WebUITestWebUIControllerFactory : public WebUIControllerFactory { class WebUITestWebUIControllerFactory : public WebUIControllerFactory {
public: public:
WebUIController* CreateWebUIControllerForURL(WebUI* web_ui, std::unique_ptr<WebUIController> CreateWebUIControllerForURL(
WebUI* web_ui,
const GURL& url) const override { const GURL& url) const override {
std::string foo(url.path()); std::string foo(url.path());
if (url.path() == "/nobinding/") if (url.path() == "/nobinding/")
web_ui->SetBindings(0); web_ui->SetBindings(0);
return HasWebUIScheme(url) ? new WebUIController(web_ui) : nullptr; return HasWebUIScheme(url) ? std::make_unique<WebUIController>(web_ui)
: nullptr;
} }
WebUI::TypeID GetWebUIType(BrowserContext* browser_context, WebUI::TypeID GetWebUIType(BrowserContext* browser_context,
const GURL& url) const override { const GURL& url) const override {
......
...@@ -31,12 +31,12 @@ class ServiceWorkerInternalsUI ...@@ -31,12 +31,12 @@ class ServiceWorkerInternalsUI
using StatusCallback = base::OnceCallback<void(ServiceWorkerStatusCode)>; using StatusCallback = base::OnceCallback<void(ServiceWorkerStatusCode)>;
explicit ServiceWorkerInternalsUI(WebUI* web_ui); explicit ServiceWorkerInternalsUI(WebUI* web_ui);
~ServiceWorkerInternalsUI() override;
private: private:
class OperationProxy; class OperationProxy;
class PartitionObserver; class PartitionObserver;
~ServiceWorkerInternalsUI() override;
void AddContextFromStoragePartition(StoragePartition* partition); void AddContextFromStoragePartition(StoragePartition* partition);
void RemoveObserverFromStoragePartition(StoragePartition* partition); void RemoveObserverFromStoragePartition(StoragePartition* partition);
......
...@@ -55,33 +55,35 @@ bool ContentWebUIControllerFactory::UseWebUIBindingsForURL( ...@@ -55,33 +55,35 @@ bool ContentWebUIControllerFactory::UseWebUIBindingsForURL(
return UseWebUIForURL(browser_context, url); return UseWebUIForURL(browser_context, url);
} }
WebUIController* ContentWebUIControllerFactory::CreateWebUIControllerForURL( std::unique_ptr<WebUIController>
WebUI* web_ui, const GURL& url) const { ContentWebUIControllerFactory::CreateWebUIControllerForURL(
WebUI* web_ui,
const GURL& url) const {
if (!url.SchemeIs(kChromeUIScheme)) if (!url.SchemeIs(kChromeUIScheme))
return nullptr; return nullptr;
if (url.host_piece() == kChromeUIAppCacheInternalsHost) if (url.host_piece() == kChromeUIAppCacheInternalsHost)
return new AppCacheInternalsUI(web_ui); return std::make_unique<AppCacheInternalsUI>(web_ui);
if (url.host_piece() == kChromeUIGpuHost) if (url.host_piece() == kChromeUIGpuHost)
return new GpuInternalsUI(web_ui); return std::make_unique<GpuInternalsUI>(web_ui);
if (url.host_piece() == kChromeUIHistogramHost) if (url.host_piece() == kChromeUIHistogramHost)
return new HistogramsInternalsUI(web_ui); return std::make_unique<HistogramsInternalsUI>(web_ui);
if (url.host_piece() == kChromeUIIndexedDBInternalsHost) if (url.host_piece() == kChromeUIIndexedDBInternalsHost)
return new IndexedDBInternalsUI(web_ui); return std::make_unique<IndexedDBInternalsUI>(web_ui);
if (url.host_piece() == kChromeUIMediaInternalsHost) if (url.host_piece() == kChromeUIMediaInternalsHost)
return new MediaInternalsUI(web_ui); return std::make_unique<MediaInternalsUI>(web_ui);
if (url.host_piece() == kChromeUIAccessibilityHost) if (url.host_piece() == kChromeUIAccessibilityHost)
return new AccessibilityUI(web_ui); return std::make_unique<AccessibilityUI>(web_ui);
if (url.host_piece() == kChromeUIServiceWorkerInternalsHost) if (url.host_piece() == kChromeUIServiceWorkerInternalsHost)
return new ServiceWorkerInternalsUI(web_ui); return std::make_unique<ServiceWorkerInternalsUI>(web_ui);
if (url.host_piece() == kChromeUINetworkErrorsListingHost) if (url.host_piece() == kChromeUINetworkErrorsListingHost)
return new NetworkErrorsListingUI(web_ui); return std::make_unique<NetworkErrorsListingUI>(web_ui);
#if !defined(OS_ANDROID) #if !defined(OS_ANDROID)
if (url.host_piece() == kChromeUITracingHost) if (url.host_piece() == kChromeUITracingHost)
return new TracingUI(web_ui); return std::make_unique<TracingUI>(web_ui);
#endif #endif
if (url.host_piece() == kChromeUIWebRTCInternalsHost) if (url.host_piece() == kChromeUIWebRTCInternalsHost)
return new WebRTCInternalsUI(web_ui); return std::make_unique<WebRTCInternalsUI>(web_ui);
return nullptr; return nullptr;
} }
......
...@@ -15,17 +15,19 @@ namespace content { ...@@ -15,17 +15,19 @@ namespace content {
class CONTENT_EXPORT ContentWebUIControllerFactory class CONTENT_EXPORT ContentWebUIControllerFactory
: public WebUIControllerFactory { : public WebUIControllerFactory {
public: public:
static ContentWebUIControllerFactory* GetInstance();
// WebUIControllerFactory:
WebUI::TypeID GetWebUIType(BrowserContext* browser_context, WebUI::TypeID GetWebUIType(BrowserContext* browser_context,
const GURL& url) const override; const GURL& url) const override;
bool UseWebUIForURL(BrowserContext* browser_context, bool UseWebUIForURL(BrowserContext* browser_context,
const GURL& url) const override; const GURL& url) const override;
bool UseWebUIBindingsForURL(BrowserContext* browser_context, bool UseWebUIBindingsForURL(BrowserContext* browser_context,
const GURL& url) const override; const GURL& url) const override;
WebUIController* CreateWebUIControllerForURL(WebUI* web_ui, std::unique_ptr<WebUIController> CreateWebUIControllerForURL(
WebUI* web_ui,
const GURL& url) const override; const GURL& url) const override;
static ContentWebUIControllerFactory* GetInstance();
protected: protected:
ContentWebUIControllerFactory(); ContentWebUIControllerFactory();
~ContentWebUIControllerFactory() override; ~ContentWebUIControllerFactory() override;
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include "base/lazy_instance.h" #include "base/lazy_instance.h"
#include "content/browser/frame_host/debug_urls.h" #include "content/browser/frame_host/debug_urls.h"
#include "content/public/browser/content_browser_client.h" #include "content/public/browser/content_browser_client.h"
#include "content/public/browser/web_ui_controller.h"
#include "content/public/common/url_constants.h" #include "content/public/common/url_constants.h"
#include "content/public/common/url_utils.h" #include "content/public/common/url_utils.h"
#include "url/gurl.h" #include "url/gurl.h"
...@@ -39,13 +40,14 @@ WebUIControllerFactoryRegistry* WebUIControllerFactoryRegistry::GetInstance() { ...@@ -39,13 +40,14 @@ WebUIControllerFactoryRegistry* WebUIControllerFactoryRegistry::GetInstance() {
return base::Singleton<WebUIControllerFactoryRegistry>::get(); return base::Singleton<WebUIControllerFactoryRegistry>::get();
} }
WebUIController* WebUIControllerFactoryRegistry::CreateWebUIControllerForURL( std::unique_ptr<WebUIController>
WebUI* web_ui, const GURL& url) const { WebUIControllerFactoryRegistry::CreateWebUIControllerForURL(
std::vector<WebUIControllerFactory*>* factories = WebUI* web_ui,
g_web_ui_controller_factories.Pointer(); const GURL& url) const {
for (size_t i = 0; i < factories->size(); ++i) { std::vector<WebUIControllerFactory*>& factories =
WebUIController* controller = (*factories)[i]->CreateWebUIControllerForURL( g_web_ui_controller_factories.Get();
web_ui, url); for (const WebUIControllerFactory* factory : factories) {
auto controller = factory->CreateWebUIControllerForURL(web_ui, url);
if (controller) if (controller)
return controller; return controller;
} }
......
...@@ -20,7 +20,8 @@ class CONTENT_EXPORT WebUIControllerFactoryRegistry ...@@ -20,7 +20,8 @@ class CONTENT_EXPORT WebUIControllerFactoryRegistry
// WebUIControllerFactory implementation. Each method loops through the same // WebUIControllerFactory implementation. Each method loops through the same
// method on all the factories. // method on all the factories.
WebUIController* CreateWebUIControllerForURL(WebUI* web_ui, std::unique_ptr<WebUIController> CreateWebUIControllerForURL(
WebUI* web_ui,
const GURL& url) const override; const GURL& url) const override;
WebUI::TypeID GetWebUIType(BrowserContext* browser_context, WebUI::TypeID GetWebUIType(BrowserContext* browser_context,
const GURL& url) const override; const GURL& url) const override;
......
...@@ -160,19 +160,22 @@ class TestWebUIControllerFactory : public WebUIControllerFactory { ...@@ -160,19 +160,22 @@ class TestWebUIControllerFactory : public WebUIControllerFactory {
void set_run_loop(base::RunLoop* run_loop) { run_loop_ = run_loop; } void set_run_loop(base::RunLoop* run_loop) { run_loop_ = run_loop; }
WebUIController* CreateWebUIControllerForURL(WebUI* web_ui, std::unique_ptr<WebUIController> CreateWebUIControllerForURL(
WebUI* web_ui,
const GURL& url) const override { const GURL& url) const override {
if (url.query() == "ping") if (url.query() == "ping")
return new PingTestWebUIController(web_ui, run_loop_); return std::make_unique<PingTestWebUIController>(web_ui, run_loop_);
if (url.query() == "webui_bindings") if (url.query() == "webui_bindings") {
return new TestWebUIController(web_ui, run_loop_, BINDINGS_POLICY_WEB_UI); return std::make_unique<TestWebUIController>(web_ui, run_loop_,
BINDINGS_POLICY_WEB_UI);
}
if (url.query() == "hybrid") { if (url.query() == "hybrid") {
return new TestWebUIController( return std::make_unique<TestWebUIController>(
web_ui, run_loop_, web_ui, run_loop_,
BINDINGS_POLICY_WEB_UI | BINDINGS_POLICY_MOJO_WEB_UI); BINDINGS_POLICY_WEB_UI | BINDINGS_POLICY_MOJO_WEB_UI);
} }
return new TestWebUIController(web_ui, run_loop_); return std::make_unique<TestWebUIController>(web_ui, run_loop_);
} }
WebUI::TypeID GetWebUIType(BrowserContext* browser_context, WebUI::TypeID GetWebUIType(BrowserContext* browser_context,
const GURL& url) const override { const GURL& url) const override {
......
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
#ifndef CONTENT_PUBLIC_BROWSER_WEB_UI_CONTROLLER_FACTORY_H_ #ifndef CONTENT_PUBLIC_BROWSER_WEB_UI_CONTROLLER_FACTORY_H_
#define CONTENT_PUBLIC_BROWSER_WEB_UI_CONTROLLER_FACTORY_H_ #define CONTENT_PUBLIC_BROWSER_WEB_UI_CONTROLLER_FACTORY_H_
#include <memory>
#include "content/common/content_export.h" #include "content/common/content_export.h"
#include "content/public/browser/web_ui.h" #include "content/public/browser/web_ui.h"
...@@ -28,8 +30,9 @@ class CONTENT_EXPORT WebUIControllerFactory { ...@@ -28,8 +30,9 @@ class CONTENT_EXPORT WebUIControllerFactory {
// Returns a WebUIController instance for the given URL, or nullptr if the URL // Returns a WebUIController instance for the given URL, or nullptr if the URL
// doesn't correspond to a WebUI. // doesn't correspond to a WebUI.
virtual WebUIController* CreateWebUIControllerForURL( virtual std::unique_ptr<WebUIController> CreateWebUIControllerForURL(
WebUI* web_ui, const GURL& url) const = 0; WebUI* web_ui,
const GURL& url) const = 0;
// Gets the WebUI type for the given URL. This will return kNoWebUI if the // Gets the WebUI type for the given URL. This will return kNoWebUI if the
// corresponding call to CreateWebUIForURL would fail, or something // corresponding call to CreateWebUIForURL would fail, or something
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include "content/common/view_messages.h" #include "content/common/view_messages.h"
#include "content/public/browser/browser_context.h" #include "content/public/browser/browser_context.h"
#include "content/public/browser/native_web_keyboard_event.h" #include "content/public/browser/native_web_keyboard_event.h"
#include "content/public/browser/web_ui_controller.h"
#include "content/public/browser/web_ui_controller_factory.h" #include "content/public/browser/web_ui_controller_factory.h"
#include "content/public/common/bindings_policy.h" #include "content/public/common/bindings_policy.h"
#include "content/public/common/browser_side_navigation_policy.h" #include "content/public/common/browser_side_navigation_policy.h"
...@@ -160,7 +161,8 @@ int ConvertMockKeyboardModifier(MockKeyboard::Modifiers modifiers) { ...@@ -160,7 +161,8 @@ int ConvertMockKeyboardModifier(MockKeyboard::Modifiers modifiers) {
class WebUITestWebUIControllerFactory : public WebUIControllerFactory { class WebUITestWebUIControllerFactory : public WebUIControllerFactory {
public: public:
WebUIController* CreateWebUIControllerForURL(WebUI* web_ui, std::unique_ptr<WebUIController> CreateWebUIControllerForURL(
WebUI* web_ui,
const GURL& url) const override { const GURL& url) const override {
return nullptr; return nullptr;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment