Commit 95e1c74b authored by Anne Lim's avatar Anne Lim Committed by Commit Bot

[Autofill] Empty chrome://autofill-internals page

Created a page which is empty for now, but will be used to help
diagnose tricky Autofill bugs.

Bug: 928595
Change-Id: I841a568eaeb24d312c26965d52265b948be7a1be
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1497283Reviewed-by: default avatarTommy Li <tommycli@chromium.org>
Reviewed-by: default avatarJared Saul <jsaul@google.com>
Commit-Queue: Anne Lim <annelim@google.com>
Cr-Commit-Position: refs/heads/master@{#638209}
parent 6f908c81
......@@ -110,6 +110,7 @@
<include name="IDR_ACCESSIBILITY_CSS" file="resources\accessibility\accessibility.css" compress="gzip" type="BINDATA" />
<include name="IDR_ACCESSIBILITY_JS" file="resources\accessibility\accessibility.js" flattenhtml="true" compress="gzip" type="BINDATA" />
<include name="IDR_AD_NETWORK_HASHES" file="resources\ad_networks.dat" type="BINDATA" />
<include name="IDR_AUTOFILL_INTERNALS_HTML" file="resources\autofill_internals.html" compress="gzip" type="BINDATA" />
<include name="IDR_BLUETOOTH_ADAPTER_MOJO_JS" file="${root_gen_dir}\device\bluetooth\public\mojom\adapter.mojom-lite.js" use_base_dir="false" type="BINDATA" compress="gzip" />
<include name="IDR_BLUETOOTH_DEVICE_MOJO_JS" file="${root_gen_dir}\device\bluetooth\public\mojom\device.mojom-lite.js" use_base_dir="false" type="BINDATA" compress="gzip" />
<include name="IDR_BLUETOOTH_UUID_MOJO_JS" file="${root_gen_dir}\device\bluetooth\public\mojom\uuid.mojom-lite.js" use_base_dir="false" type="BINDATA" compress="gzip" />
......
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Autofill Internals</title>
</head>
<body>
<p>Autofill Internals -- Comming soon!</p>
</body>
</html>
......@@ -215,6 +215,8 @@ jumbo_split_static_library("ui") {
"webauthn/authenticator_request_dialog.h",
"webui/about_ui.cc",
"webui/about_ui.h",
"webui/autofill_internals_ui.cc",
"webui/autofill_internals_ui.h",
"webui/chrome_web_ui_controller_factory.cc",
"webui/chrome_web_ui_controller_factory.h",
"webui/components_ui.cc",
......
// Copyright 2019 The Chromium Authors. All rights reserved.
// 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/autofill_internals_ui.h"
#include <string>
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/url_constants.h"
#include "chrome/grit/browser_resources.h"
#include "content/public/browser/web_ui_data_source.h"
#include "base/bind.h"
#include "content/public/browser/storage_partition.h"
#include "content/public/browser/web_ui.h"
namespace {
content::WebUIDataSource* CreateAutofillInternalsHTMLSource() {
content::WebUIDataSource* source =
content::WebUIDataSource::Create(chrome::kChromeUIAutofillInternalsHost);
source->SetDefaultResource(IDR_AUTOFILL_INTERNALS_HTML);
source->UseGzip();
return source;
}
} // namespace
AutofillInternalsUI::AutofillInternalsUI(content::WebUI* web_ui)
: WebUIController(web_ui) {
// Set up the chrome://autofill-internals source.
Profile* profile = Profile::FromWebUI(web_ui);
content::WebUIDataSource::Add(profile, CreateAutofillInternalsHTMLSource());
}
// Copyright 2019 The Chromium Authors. All rights reserved.
// 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_AUTOFILL_INTERNALS_UI_H_
#define CHROME_BROWSER_UI_WEBUI_AUTOFILL_INTERNALS_UI_H_
#include "base/macros.h"
#include "content/public/browser/web_ui_controller.h"
class AutofillInternalsUI : public content::WebUIController {
public:
explicit AutofillInternalsUI(content::WebUI* web_ui);
private:
DISALLOW_COPY_AND_ASSIGN(AutofillInternalsUI);
};
#endif // CHROME_BROWSER_UI_WEBUI_AUTOFILL_INTERNALS_UI_H_
......@@ -22,6 +22,7 @@
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/search/suggestions/suggestions_ui.h"
#include "chrome/browser/ui/webui/about_ui.h"
#include "chrome/browser/ui/webui/autofill_internals_ui.h"
#include "chrome/browser/ui/webui/bluetooth_internals/bluetooth_internals_ui.h"
#include "chrome/browser/ui/webui/chromeos/account_manager_welcome_ui.h"
#include "chrome/browser/ui/webui/components_ui.h"
......@@ -353,6 +354,8 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui,
// print dialog.
if (url.host_piece() == chrome::kChromeUIAccessibilityHost)
return &NewWebUI<AccessibilityUI>;
if (url.host_piece() == chrome::kChromeUIAutofillInternalsHost)
return &NewWebUI<AutofillInternalsUI>;
if (url.host_piece() == chrome::kChromeUIBluetoothInternalsHost)
return &NewWebUI<BluetoothInternalsUI>;
if (url.host_piece() == chrome::kChromeUIComponentsHost)
......
......@@ -23,6 +23,7 @@ const char kChromeUIAppIconHost[] = "app-icon";
const char kChromeUIAppIconURL[] = "chrome://app-icon/";
const char kChromeUIAppLauncherPageHost[] = "apps";
const char kChromeUIAppsURL[] = "chrome://apps/";
const char kChromeUIAutofillInternalsHost[] = "autofill-internals";
const char kChromeUIBluetoothInternalsHost[] = "bluetooth-internals";
const char kChromeUIBookmarksHost[] = "bookmarks";
const char kChromeUIBookmarksURL[] = "chrome://bookmarks/";
......
......@@ -30,6 +30,7 @@ extern const char kChromeUIAppIconHost[];
extern const char kChromeUIAppIconURL[];
extern const char kChromeUIAppLauncherPageHost[];
extern const char kChromeUIAppsURL[];
extern const char kChromeUIAutofillInternalsHost[];
extern const char kChromeUIBluetoothInternalsHost[];
extern const char kChromeUIBookmarksHost[];
extern const char kChromeUIBookmarksURL[];
......
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