Commit e5fdb462 authored by Dan Beam's avatar Dan Beam Committed by Commit Bot

Wrangle names of incognito theme CSS

R=pkasting@chromium.org

Bug: none
Change-Id: I32b7d2101115e5c82450f188a7aba98446a7a976
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2003222
Commit-Queue: Dan Beam <dbeam@chromium.org>
Auto-Submit: Dan Beam <dbeam@chromium.org>
Reviewed-by: default avatarPeter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#732284}
parent 614b7ad7
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
<if expr="not is_android"> <if expr="not is_android">
<!-- New Tab Page WebUI. --> <!-- New Tab Page WebUI. -->
<structure name="IDR_INCOGNITO_TAB_HTML" file="resources\ntp4\incognito_tab.html" compress="gzip" flattenhtml="true" type="chrome_html" /> <structure name="IDR_INCOGNITO_TAB_HTML" file="resources\ntp4\incognito_tab.html" compress="gzip" flattenhtml="true" type="chrome_html" />
<structure name="IDR_INCOGNITO_TAB_THEME_CSS" file="resources\ntp4\incognito_tab_theme.css" compress="gzip" flattenhtml="true" type="chrome_html" />
<structure name="IDR_GUEST_TAB_HTML" file="resources\ntp4\guest_tab.html" compress="gzip" flattenhtml="true" type="chrome_html" /> <structure name="IDR_GUEST_TAB_HTML" file="resources\ntp4\guest_tab.html" compress="gzip" flattenhtml="true" type="chrome_html" />
<structure name="IDR_NEW_INCOGNITO_TAB_THEME_CSS" file="resources\ntp4\new_incognito_tab_theme.css" compress="gzip" flattenhtml="true" type="chrome_html" />
<structure name="IDR_NEW_TAB_4_HTML" file="resources\ntp4\new_tab.html" compress="gzip" flattenhtml="true" type="chrome_html" /> <structure name="IDR_NEW_TAB_4_HTML" file="resources\ntp4\new_tab.html" compress="gzip" flattenhtml="true" type="chrome_html" />
<structure name="IDR_NEW_TAB_4_THEME_CSS" file="resources\ntp4\new_tab_theme.css" compress="gzip" flattenhtml="true" type="chrome_html" /> <structure name="IDR_NEW_TAB_4_THEME_CSS" file="resources\ntp4\new_tab_theme.css" compress="gzip" flattenhtml="true" type="chrome_html" />
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<script> <script>
// Until themes can clear the cache, force-reload the theme stylesheet. // Until themes can clear the cache, force-reload the theme stylesheet.
document.write('<link id="incognitothemecss" rel="stylesheet" ' + document.write('<link id="incognitothemecss" rel="stylesheet" ' +
'href="chrome://theme/css/incognito_new_tab_theme.css?' + 'href="chrome://theme/css/incognito_tab_theme.css?' +
Date.now() + '">'); Date.now() + '">');
</script> </script>
</head> </head>
......
...@@ -7,7 +7,7 @@ window.addEventListener('load', function() { ...@@ -7,7 +7,7 @@ window.addEventListener('load', function() {
document.documentElement.setAttribute( document.documentElement.setAttribute(
'hascustombackground', themeData.hasCustomBackground); 'hascustombackground', themeData.hasCustomBackground);
$('incognitothemecss').href = $('incognitothemecss').href =
'chrome://theme/css/incognito_new_tab_theme.css?' + Date.now(); 'chrome://theme/css/incognito_tab_theme.css?' + Date.now();
}); });
chrome.send('observeThemeChanges'); chrome.send('observeThemeChanges');
......
...@@ -552,7 +552,7 @@ void NTPResourceCache::CreateNewTabIncognitoCSS() { ...@@ -552,7 +552,7 @@ void NTPResourceCache::CreateNewTabIncognitoCSS() {
static const base::NoDestructor<scoped_refptr<base::RefCountedMemory>> static const base::NoDestructor<scoped_refptr<base::RefCountedMemory>>
new_tab_theme_css( new_tab_theme_css(
ui::ResourceBundle::GetSharedInstance().LoadDataResourceBytes( ui::ResourceBundle::GetSharedInstance().LoadDataResourceBytes(
IDR_NEW_INCOGNITO_TAB_THEME_CSS)); IDR_INCOGNITO_TAB_THEME_CSS));
CHECK(*new_tab_theme_css); CHECK(*new_tab_theme_css);
// Create the string from our template and the replacements. // Create the string from our template and the replacements.
......
...@@ -44,10 +44,9 @@ GURL GetThemeUrl(const std::string& path) { ...@@ -44,10 +44,9 @@ GURL GetThemeUrl(const std::string& path) {
} }
bool IsNewTabCssPath(const std::string& path) { bool IsNewTabCssPath(const std::string& path) {
static const char kNewTabCSSPath[] = "css/new_tab_theme.css"; static const char kNewTabThemeCssPath[] = "css/new_tab_theme.css";
static const char kIncognitoNewTabCSSPath[] = static const char kIncognitoTabThemeCssPath[] = "css/incognito_tab_theme.css";
"css/incognito_new_tab_theme.css"; return path == kNewTabThemeCssPath || path == kIncognitoTabThemeCssPath;
return (path == kNewTabCSSPath) || (path == kIncognitoNewTabCSSPath);
} }
void ProcessImageOnUiThread(const gfx::ImageSkia& image, void ProcessImageOnUiThread(const gfx::ImageSkia& image,
......
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