Commit 3bbc1912 authored by Aya ElAttar's avatar Aya ElAttar Committed by Commit Bot

Move ChromeUrlDisabledUI under webui/chromeos

- This CL is based on dpapapd@ comments on
crrev.com/c/2098906

- Moved ChromeURLDisabledUI to a separate folder
under webui/chromeos directory.

Change-Id: I17a3ab761b91a05af00d6c6db5e9d857d7ba488b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2349708Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Commit-Queue: Aya Elsayed <ayaelattar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#797391}
parent e600d18d
......@@ -139,7 +139,9 @@
<include name="IDR_INLINE_LOGIN_BROWSER_PROXY_JS" file="resources\inline_login\inline_login_browser_proxy.js" type ="BINDATA"/>
</if>
<include name="IDR_CHROME_URLS_DISABLED_PAGE_HTML" file="resources\chrome_urls_disabled_page\app.html" type="BINDATA" />
<if expr="chromeos">
<include name="IDR_CHROME_URLS_DISABLED_PAGE_HTML" file="resources\chromeos\chrome_urls_disabled_page\app.html" type="BINDATA" />
</if>
<include name="IDR_IDENTITY_API_SCOPE_APPROVAL_MANIFEST" file="resources\identity_scope_approval_dialog\manifest.json" type="BINDATA" />
......
......@@ -2061,8 +2061,6 @@ static_library("ui") {
"webui/app_management/app_management_shelf_delegate_chromeos.h",
"webui/certificate_provisioning_ui_handler.cc",
"webui/certificate_provisioning_ui_handler.h",
"webui/chrome_url_disabled_ui.cc",
"webui/chrome_url_disabled_ui.h",
"webui/chromeos/account_manager/account_manager_error_ui.cc",
"webui/chromeos/account_manager/account_manager_error_ui.h",
"webui/chromeos/account_manager/account_manager_welcome_dialog.cc",
......@@ -2108,6 +2106,8 @@ static_library("ui") {
"webui/chromeos/cellular_setup/mobile_setup_ui.h",
"webui/chromeos/certificate_manager_dialog_ui.cc",
"webui/chromeos/certificate_manager_dialog_ui.h",
"webui/chromeos/chrome_url_disabled/chrome_url_disabled_ui.cc",
"webui/chromeos/chrome_url_disabled/chrome_url_disabled_ui.h",
"webui/chromeos/crostini_installer/crostini_installer_dialog.cc",
"webui/chromeos/crostini_installer/crostini_installer_dialog.h",
"webui/chromeos/crostini_installer/crostini_installer_page_handler.cc",
......
......@@ -28,10 +28,10 @@
#include "chrome/browser/ui/webui/autofill_and_password_manager_internals/autofill_internals_ui.h"
#include "chrome/browser/ui/webui/autofill_and_password_manager_internals/password_manager_internals_ui.h"
#include "chrome/browser/ui/webui/bluetooth_internals/bluetooth_internals_ui.h"
#include "chrome/browser/ui/webui/chrome_url_disabled_ui.h"
#include "chrome/browser/ui/webui/chromeos/account_manager/account_manager_error_ui.h"
#include "chrome/browser/ui/webui/chromeos/account_manager/account_manager_welcome_ui.h"
#include "chrome/browser/ui/webui/chromeos/account_manager/account_migration_welcome_ui.h"
#include "chrome/browser/ui/webui/chromeos/chrome_url_disabled/chrome_url_disabled_ui.h"
#include "chrome/browser/ui/webui/chromeos/in_session_password_change/password_change_ui.h"
#include "chrome/browser/ui/webui/components/components_ui.h"
#include "chrome/browser/ui/webui/constrained_web_dialog_ui.h"
......@@ -435,7 +435,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui,
#if defined(OS_CHROMEOS)
if (url.host_piece() == chrome::kChromeUIAppDisabledHost)
return &NewWebUI<ChromeURLDisabledUI>;
return &NewWebUI<chromeos::ChromeURLDisabledUI>;
#endif // defined(OS_CHROMEOS)
if (url.host_piece() == chrome::kChromeUIBluetoothInternalsHost)
......
ayaelattar@chromium.org
\ No newline at end of file
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/webui/chrome_url_disabled_ui.h"
#include "chrome/browser/ui/webui/chromeos/chrome_url_disabled/chrome_url_disabled_ui.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/webui_url_constants.h"
......@@ -10,6 +10,8 @@
#include "components/strings/grit/components_strings.h"
#include "content/public/browser/web_ui_data_source.h"
namespace chromeos {
ChromeURLDisabledUI::ChromeURLDisabledUI(content::WebUI* web_ui)
: content::WebUIController(web_ui), weak_factory_(this) {
content::WebUIDataSource* html_source =
......@@ -34,3 +36,5 @@ ChromeURLDisabledUI::ChromeURLDisabledUI(content::WebUI* web_ui)
}
ChromeURLDisabledUI::~ChromeURLDisabledUI() = default;
} // namespace chromeos
......@@ -2,12 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_UI_WEBUI_CHROME_URL_DISABLED_UI_H_
#define CHROME_BROWSER_UI_WEBUI_CHROME_URL_DISABLED_UI_H_
#ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_CHROME_URL_DISABLED_CHROME_URL_DISABLED_UI_H_
#define CHROME_BROWSER_UI_WEBUI_CHROMEOS_CHROME_URL_DISABLED_CHROME_URL_DISABLED_UI_H_
#include "base/memory/weak_ptr.h"
#include "content/public/browser/web_ui_controller.h"
namespace chromeos {
// For chrome:://.* error page when disabled by admin policy.
class ChromeURLDisabledUI : public content::WebUIController {
public:
......@@ -18,4 +20,6 @@ class ChromeURLDisabledUI : public content::WebUIController {
base::WeakPtrFactory<ChromeURLDisabledUI> weak_factory_;
};
#endif // CHROME_BROWSER_UI_WEBUI_CHROME_URL_DISABLED_UI_H_
} // namespace chromeos
#endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_CHROME_URL_DISABLED_CHROME_URL_DISABLED_UI_H_
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