Remove dependencies on Kiosk Next internal src.

Bug: 977019
Change-Id: Ie798b541d1a0138c4ebef2f5a27adad23839b214
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1672828
Reviewed-by: Michael Giuffrida <michaelpg@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Bruno Santos <brunoad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#672060}
diff --git a/chrome/browser/browser_resources.grd b/chrome/browser/browser_resources.grd
index 0e329859..15d6745 100644
--- a/chrome/browser/browser_resources.grd
+++ b/chrome/browser/browser_resources.grd
@@ -531,14 +531,7 @@
         <include name="IDR_PRODUCT_CHROMEOS_SYNC_CONSENT_SCREEN_ICONS" file="internal\resources\chromeos-sync-consent-icons.html" type="BINDATA" />
       </if>
       <if expr="_kiosk_next">
-        <if expr="_google_chrome">
-          <then>
-            <include name="IDR_KIOSK_NEXT_HOME_MANIFEST" file="resources\chromeos\kiosk_next_home\internal\manifest.json" type="BINDATA" />
-          </then>
-          <else>
-            <include name="IDR_KIOSK_NEXT_HOME_MANIFEST" file="resources\chromeos\kiosk_next_home\manifest.json" type="BINDATA" />
-          </else>
-        </if>
+        <include name="IDR_KIOSK_NEXT_HOME_MANIFEST" file="resources\chromeos\kiosk_next_home\manifest.json" type="BINDATA" />
       </if>
       <if expr="is_win">
         <include name="IDR_SET_AS_DEFAULT_BROWSER_JS" file="resources\set_as_default_browser.js" flattenhtml="true" type="BINDATA" />
diff --git a/chrome/browser/chromeos/BUILD.gn b/chrome/browser/chromeos/BUILD.gn
index 0b3320f..641b5a6 100644
--- a/chrome/browser/chromeos/BUILD.gn
+++ b/chrome/browser/chromeos/BUILD.gn
@@ -4,7 +4,6 @@
 
 import("//build/config/features.gni")
 import("//build/config/ui.gni")
-import("//chrome/browser/chromeos/kiosk_next_home/kiosk_next.gni")
 import("//extensions/buildflags/buildflags.gni")
 import("//media/media_options.gni")
 import("//printing/buildflags/buildflags.gni")
@@ -2161,13 +2160,6 @@
   if (use_cras) {
     defines += [ "USE_CRAS" ]
   }
-  if (enable_kiosk_next) {
-    defines += [ "KIOSK_NEXT" ]
-    if (is_chrome_branded) {
-      public_deps +=
-          [ "//chrome/browser/resources:kiosk_next_internal_resources" ]
-    }
-  }
 }
 
 copy("dbus_service_files") {
diff --git a/chrome/browser/chromeos/kiosk_next_home/intent_config_helper.cc b/chrome/browser/chromeos/kiosk_next_home/intent_config_helper.cc
index 3b8b48c..674990e 100644
--- a/chrome/browser/chromeos/kiosk_next_home/intent_config_helper.cc
+++ b/chrome/browser/chromeos/kiosk_next_home/intent_config_helper.cc
@@ -18,11 +18,6 @@
 #include "services/data_decoder/public/cpp/safe_json_parser.h"
 #include "url/url_constants.h"
 
-#if defined(KIOSK_NEXT) && defined(GOOGLE_CHROME_BUILD)
-#include "chrome/grit/kiosk_next_internal_resources.h"
-#include "ui/base/resource/resource_bundle.h"
-#endif
-
 namespace chromeos {
 namespace kiosk_next_home {
 
@@ -59,13 +54,7 @@
 
   // IntentConfigHelper::Delegate:
   std::string GetJsonConfig() const override {
-#if defined(KIOSK_NEXT) && defined(GOOGLE_CHROME_BUILD)
-    return ui::ResourceBundle::GetSharedInstance()
-        .GetRawDataResource(IDR_KIOSK_NEXT_INTENT_CONFIG_JSON)
-        .as_string();
-#else
     return std::string();
-#endif
   }
 
   DISALLOW_COPY_AND_ASSIGN(ReadJsonConfigResourceDelegate);
diff --git a/chrome/browser/extensions/BUILD.gn b/chrome/browser/extensions/BUILD.gn
index 9ee32ea..b6a0422 100644
--- a/chrome/browser/extensions/BUILD.gn
+++ b/chrome/browser/extensions/BUILD.gn
@@ -1006,9 +1006,6 @@
     if (enable_kiosk_next) {
       defines += [ "KIOSK_NEXT" ]
       deps += [ "//chrome/browser/chromeos/kiosk_next_home/mojom" ]
-      if (is_chrome_branded) {
-        deps += [ "//chrome/browser/resources:kiosk_next_internal_resources" ]
-      }
     }
     if (enable_nacl) {
       deps += [ "//chrome/browser/resources/chromeos/zip_archiver" ]
diff --git a/chrome/browser/extensions/chrome_component_extension_resource_manager.cc b/chrome/browser/extensions/chrome_component_extension_resource_manager.cc
index f240231..c4b6229 100644
--- a/chrome/browser/extensions/chrome_component_extension_resource_manager.cc
+++ b/chrome/browser/extensions/chrome_component_extension_resource_manager.cc
@@ -26,10 +26,6 @@
 #include "ui/file_manager/grit/file_manager_resources.h"
 #endif
 
-#if defined(KIOSK_NEXT) && defined(GOOGLE_CHROME_BUILD)
-#include "chrome/grit/kiosk_next_internal_resources_map.h"
-#endif
-
 namespace extensions {
 
 ChromeComponentExtensionResourceManager::
@@ -90,11 +86,6 @@
       keyboard_resources,
       keyboard_resource_size);
 #endif
-
-#if defined(KIOSK_NEXT) && defined(GOOGLE_CHROME_BUILD)
-  AddComponentResourceEntries(kKioskNextInternalResources,
-                              kKioskNextInternalResourcesSize);
-#endif
 }
 
 ChromeComponentExtensionResourceManager::
diff --git a/chrome/browser/resources/BUILD.gn b/chrome/browser/resources/BUILD.gn
index 160d9ce..29462c9 100644
--- a/chrome/browser/resources/BUILD.gn
+++ b/chrome/browser/resources/BUILD.gn
@@ -239,20 +239,6 @@
     ]
     output_dir = "$root_gen_dir/chrome"
   }
-
-  if (enable_kiosk_next && is_chrome_branded) {
-    grit("kiosk_next_internal_resources") {
-      source = "kiosk_next_internal_resources.grd"
-      defines = chrome_grit_defines
-      outputs = [
-        "grit/kiosk_next_internal_resources.h",
-        "grit/kiosk_next_internal_resources_map.cc",
-        "grit/kiosk_next_internal_resources_map.h",
-        "kiosk_next_internal_resources.pak",
-      ]
-      output_dir = "$root_gen_dir/chrome"
-    }
-  }
 }
 
 if (!is_android && !is_chromeos) {
diff --git a/chrome/browser/resources/chromeos/kiosk_next_home/bg_internal.js b/chrome/browser/resources/chromeos/kiosk_next_home/bg_internal.js
deleted file mode 100644
index ec93f75..0000000
--- a/chrome/browser/resources/chromeos/kiosk_next_home/bg_internal.js
+++ /dev/null
@@ -1,10 +0,0 @@
-// 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.
-
-chrome.app.runtime.onLaunched.addListener(() => {
-  const windowOptions = {state: 'maximized', frame: 'none'};
-  chrome.app.window.create('internal/main.html', windowOptions, (newWindow) => {
-    newWindow.maximize();
-  });
-});
diff --git a/chrome/browser/resources/chromeos/kiosk_next_home/kiosk_next_resources.grdp b/chrome/browser/resources/chromeos/kiosk_next_home/kiosk_next_resources.grdp
index 2d95a48..c6e6373 100644
--- a/chrome/browser/resources/chromeos/kiosk_next_home/kiosk_next_resources.grdp
+++ b/chrome/browser/resources/chromeos/kiosk_next_home/kiosk_next_resources.grdp
@@ -1,16 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
 
 <grit-part>
-  <if expr="_google_chrome">
-    <then>
-      <include name="IDR_KIOSK_NEXT_BG_JS" file="chromeos/kiosk_next_home/bg_internal.js" type="BINDATA" />
-      <include name="IDR_KIOSK_NEXT_MAIN_HTML" file="chromeos/kiosk_next_home/internal/main.html" type="chrome_html" />
-    </then>
-    <else>
-      <include name="IDR_KIOSK_NEXT_BG_JS" file="chromeos/kiosk_next_home/bg.js" type="BINDATA" />
-      <include name="IDR_KIOSK_NEXT_MAIN_HTML" file="chromeos/kiosk_next_home/main.html" type="chrome_html" />
-    </else>
-  </if>
+  <include name="IDR_KIOSK_NEXT_BG_JS" file="chromeos/kiosk_next_home/bg.js" type="BINDATA" />
+  <include name="IDR_KIOSK_NEXT_MAIN_HTML" file="chromeos/kiosk_next_home/main.html" type="chrome_html" />
   <include name="IDR_KIOSK_NEXT_ICON_192" file="chromeos/kiosk_next_home/static/icon192.png" type="BINDATA" />
   <include name="IDR_KIOSK_NEXT_API_JS" file="chromeos/kiosk_next_home/api.js" type="BINDATA" />
   <include name="IDR_KIOSK_NEXT_API_IMPL_JS" file="chromeos/kiosk_next_home/api_impl.js" type="BINDATA" />
diff --git a/chrome/browser/resources/kiosk_next_internal_resources.grd b/chrome/browser/resources/kiosk_next_internal_resources.grd
deleted file mode 100644
index 6418df0..0000000
--- a/chrome/browser/resources/kiosk_next_internal_resources.grd
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<grit latest_public_release="0" current_release="1" output_all_resource_defines="false">
-  <outputs>
-    <output filename="grit/kiosk_next_internal_resources.h" type="rc_header">
-      <emit emit_type='prepend'></emit>
-    </output>
-    <output filename="grit/kiosk_next_internal_resources_map.cc" type="resource_file_map_source" />
-    <output filename="grit/kiosk_next_internal_resources_map.h" type="resource_map_header" />
-    <output filename="kiosk_next_internal_resources.pak" type="data_package" />
-  </outputs>
-  <release seq="1">
-    <includes>
-      <part file="chromeos/kiosk_next_home/internal/kiosk_next_resources_internal.grdp" />
-    </includes>
-  </release>
-</grit>
diff --git a/chrome/chrome_paks.gni b/chrome/chrome_paks.gni
index 8ff44c7..d944436 100644
--- a/chrome/chrome_paks.gni
+++ b/chrome/chrome_paks.gni
@@ -8,10 +8,6 @@
 import("//ui/base/ui_features.gni")
 import("chrome_repack_locales.gni")
 
-if (is_chromeos) {
-  import("//chrome/browser/chromeos/kiosk_next_home/kiosk_next.gni")
-}
-
 # Generates a rule to repack a set of resources, substituting a given string
 # in for the percentage (e.g. "100", "200"). It generates the repacked files in
 # the "gen" directory, and then introduces a copy rule to copy it to the root
@@ -172,10 +168,6 @@
         "//third_party/ink:ink_resources",
         "//ui/file_manager:resources",
       ]
-      if (enable_kiosk_next && is_chrome_branded) {
-        sources += [ "$root_gen_dir/chrome/kiosk_next_internal_resources.pak" ]
-        deps += [ "//chrome/browser/resources:kiosk_next_internal_resources" ]
-      }
     }
     if (!is_android && !is_chromeos) {
       sources += [ "$root_gen_dir/chrome/onboarding_welcome_resources.pak" ]
diff --git a/tools/gritsettings/resource_ids b/tools/gritsettings/resource_ids
index f73ef93..bda2c60 100644
--- a/tools/gritsettings/resource_ids
+++ b/tools/gritsettings/resource_ids
@@ -152,9 +152,6 @@
   "chrome/browser/vr/testapp/vr_testapp_resources.grd": {
     "includes": [13990],
   },
-  "chrome/browser/resources/kiosk_next_internal_resources.grd": {
-    "includes": [14040],
-  },
   # END chrome/browser section.
 
   # START chrome/ miscellaneous section.
diff --git a/tools/gritsettings/translation_expectations.pyl b/tools/gritsettings/translation_expectations.pyl
index dbe60d3..2d9339d 100644
--- a/tools/gritsettings/translation_expectations.pyl
+++ b/tools/gritsettings/translation_expectations.pyl
@@ -99,7 +99,6 @@
   # Internal grds that contain parts not available publicly and thus should
   # not be checked by translation script.
   "internal_grds": [
-    "chrome/browser/resources/kiosk_next_internal_resources.grd",
     # Test grd that contains a part file that doesn't exist.
     "tools/translation/testdata/internal.grd",
   ],