Commit 5c5cc7ff authored by Kyle Milka's avatar Kyle Milka Committed by Commit Bot

[NTP] Rename 'custom_backgrounds' to 'customizations'

This better reflects what the code actually does as
there's now a bunch of non backgrounds related stuff
in there.

This will be followed up with renaming of the
customBackgrounds object.

Bug: None
Change-Id: I42a2f5b0eb0d5aec04ce302217f1fbf61fe57110
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1639180
Commit-Queue: Kyle Milka <kmilka@chromium.org>
Reviewed-by: default avatarKristi Park <kristipark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#665622}
parent 76991254
......@@ -13,8 +13,8 @@ js_type_check("closure_compile") {
js_library("local_ntp") {
sources = [
"animations.js",
"custom_backgrounds.js",
"custom_links_edit.js",
"customize.js",
"doodles.js",
"local_ntp.js",
"most_visited_single.js",
......
......@@ -6,7 +6,7 @@
<head>
<link rel="stylesheet" href="chrome-search://local-ntp/animations.css"></link>
<link rel="stylesheet" href="chrome-search://local-ntp/local-ntp-common.css"></link>
<link rel="stylesheet" href="chrome-search://local-ntp/custom-backgrounds.css"></link>
<link rel="stylesheet" href="chrome-search://local-ntp/customize.css"></link>
<link rel="stylesheet" href="chrome-search://local-ntp/doodles.css"></link>
<link rel="stylesheet" href="chrome-search://local-ntp/local-ntp.css"></link>
<link rel="stylesheet" href="chrome-search://local-ntp/theme.css"></link>
......@@ -18,8 +18,8 @@
integrity="$i18n{animationsIntegrity}"></script>
<script src="chrome-search://local-ntp/config.js"
integrity="$i18n{configDataIntegrity}"></script>
<script src="chrome-search://local-ntp/custom-backgrounds.js"
integrity="$i18n{localNtpCustomBgIntegrity}"></script>
<script src="chrome-search://local-ntp/customize.js"
integrity="$i18n{localNtpCustomizeIntegrity}"></script>
<script src="chrome-search://local-ntp/doodles.js"
integrity="$i18n{doodlesIntegrity}"></script>
<script src="chrome-search://local-ntp/local-ntp.js"
......
......@@ -18,8 +18,8 @@
<include name="IDR_LOCAL_NTP_ANIMATIONS_CSS" file="animations.css" flattenhtml="true" type="BINDATA" />
<include name="IDR_LOCAL_NTP_ANIMATIONS_JS" file="animations.js" flattenhtml="true" type="BINDATA" />
<include name="IDR_LOCAL_NTP_CSS" file="local_ntp.css" flattenhtml="true" type="BINDATA" />
<include name="IDR_LOCAL_NTP_CUSTOM_BACKGROUNDS_CSS" file="custom_backgrounds.css" flattenhtml="true" type="BINDATA" />
<include name="IDR_LOCAL_NTP_CUSTOM_BACKGROUNDS_JS" file="custom_backgrounds.js" flattenhtml="true" type="BINDATA" />
<include name="IDR_LOCAL_NTP_CUSTOMIZE_CSS" file="customize.css" flattenhtml="true" type="BINDATA" />
<include name="IDR_LOCAL_NTP_CUSTOMIZE_JS" file="customize.js" flattenhtml="true" type="BINDATA" />
<include name="IDR_LOCAL_NTP_DOODLES_CSS" file="doodles.css" flattenhtml="true" type="BINDATA" />
<include name="IDR_LOCAL_NTP_DOODLES_JS" file="doodles.js" flattenhtml="true" type="BINDATA" />
<include name="IDR_LOCAL_NTP_HTML" file="local_ntp.html" flattenhtml="true" allowexternalscript="true" type="BINDATA" />
......
......@@ -10,7 +10,7 @@ action("local_ntp_code_generate") {
script = "tools/generate_integrity_header.py"
header_path = "$target_gen_dir/local_ntp_js_integrity.h"
animations_js = local_ntp_resources + "/animations.js"
custom_bg_js = local_ntp_resources + "/custom_backgrounds.js"
customize_js = local_ntp_resources + "/customize.js"
doodles_js = local_ntp_resources + "/doodles.js"
local_ntp_js = local_ntp_resources + "/local_ntp.js"
utils_js = local_ntp_resources + "/utils.js"
......@@ -18,7 +18,7 @@ action("local_ntp_code_generate") {
inputs = [
animations_js,
custom_bg_js,
customize_js,
doodles_js,
local_ntp_js,
utils_js,
......@@ -32,7 +32,7 @@ action("local_ntp_code_generate") {
args = [
"--output_path=" + rebase_path(header_path, root_build_dir),
rebase_path(animations_js, root_build_dir),
rebase_path(custom_bg_js, root_build_dir),
rebase_path(customize_js, root_build_dir),
rebase_path(doodles_js, root_build_dir),
rebase_path(local_ntp_js, root_build_dir),
rebase_path(utils_js, root_build_dir),
......
......@@ -117,10 +117,8 @@ const struct Resource{
{"animations.css", IDR_LOCAL_NTP_ANIMATIONS_CSS, "text/css"},
{"animations.js", IDR_LOCAL_NTP_ANIMATIONS_JS, "application/javascript"},
{"local-ntp-common.css", IDR_LOCAL_NTP_COMMON_CSS, "text/css"},
{"custom-backgrounds.css", IDR_LOCAL_NTP_CUSTOM_BACKGROUNDS_CSS,
"text/css"},
{"custom-backgrounds.js", IDR_LOCAL_NTP_CUSTOM_BACKGROUNDS_JS,
"application/javascript"},
{"customize.css", IDR_LOCAL_NTP_CUSTOMIZE_CSS, "text/css"},
{"customize.js", IDR_LOCAL_NTP_CUSTOMIZE_JS, "application/javascript"},
{"doodles.css", IDR_LOCAL_NTP_DOODLES_CSS, "text/css"},
{"doodles.js", IDR_LOCAL_NTP_DOODLES_JS, "application/javascript"},
{"images/close_3_mask.png", IDR_CLOSE_3_MASK, "image/png"},
......@@ -979,8 +977,8 @@ void LocalNtpSource::StartDataRequest(
base::StrCat({kSha256, ANIMATIONS_JS_INTEGRITY});
replacements["configDataIntegrity"] = base::StrCat(
{kSha256, search_config_provider_->config_data_integrity()});
replacements["localNtpCustomBgIntegrity"] =
base::StrCat({kSha256, CUSTOM_BACKGROUNDS_JS_INTEGRITY});
replacements["localNtpCustomizeIntegrity"] =
base::StrCat({kSha256, CUSTOMIZE_JS_INTEGRITY});
replacements["doodlesIntegrity"] =
base::StrCat({kSha256, DOODLES_JS_INTEGRITY});
replacements["localNtpIntegrity"] =
......@@ -1113,9 +1111,8 @@ std::string LocalNtpSource::GetContentSecurityPolicy() const {
std::string script_src_csp = base::StringPrintf(
"script-src 'strict-dynamic' 'sha256-%s' 'sha256-%s' 'sha256-%s' "
"'sha256-%s' 'sha256-%s' 'sha256-%s' 'sha256-%s';",
ANIMATIONS_JS_INTEGRITY, CUSTOM_BACKGROUNDS_JS_INTEGRITY,
DOODLES_JS_INTEGRITY, LOCAL_NTP_JS_INTEGRITY, UTILS_JS_INTEGRITY,
VOICE_JS_INTEGRITY,
ANIMATIONS_JS_INTEGRITY, CUSTOMIZE_JS_INTEGRITY, DOODLES_JS_INTEGRITY,
LOCAL_NTP_JS_INTEGRITY, UTILS_JS_INTEGRITY, VOICE_JS_INTEGRITY,
search_config_provider_->config_data_integrity().c_str());
return GetContentSecurityPolicyObjectSrc() +
......
......@@ -7,13 +7,13 @@
<script>window.localNTPUnitTest = true;</script>
<link rel="stylesheet" href="chrome-search://local-ntp/animations.css"></link>
<link rel="stylesheet" href="chrome-search://local-ntp/local-ntp-common.css"></link>
<link rel="stylesheet" href="chrome-search://local-ntp/custom-backgrounds.css"></link>
<link rel="stylesheet" href="chrome-search://local-ntp/customize.css"></link>
<link rel="stylesheet" href="chrome-search://local-ntp/doodles.css"></link>
<link rel="stylesheet" href="chrome-search://local-ntp/local-ntp.css"></link>
<link rel="stylesheet" href="chrome-search://local-ntp/voice.css"></link>
<script src="chrome-search://local-ntp/animations.js" charset="utf-8"></script>
<script src="chrome-search://local-ntp/config.js" charset="utf-8"></script>
<script src="chrome-search://local-ntp/custom-backgrounds.js" charset="utf-8"></script>
<script src="chrome-search://local-ntp/customize.js" charset="utf-8"></script>
<script src="chrome-search://local-ntp/doodles.js" charset="utf-8"></script>
<script src="chrome-search://local-ntp/local-ntp.js" charset="utf-8"></script>
<script src="chrome-search://local-ntp/utils.js" charset="utf-8"></script>
......
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