Commit 43556713 authored by estade's avatar estade Committed by Commit bot

Reland of Add channel-specific product logo to chrome://help (patchset #1 id:1...

Reland of Add channel-specific product logo to chrome://help (patchset #1 id:1 of https://codereview.chromium.org/1280033002/ )

Reason for revert:
Official build bots were all happy with the change --- suspect the issue was a local config problem (such as not updating src-internal).

Original issue's description:
> Revert of Add channel-specific product logo to chrome://help (patchset #3 id:40001 of https://codereview.chromium.org/1269383005/ )
>
> Reason for revert:
> Reverting due to missing files.  See comments in cl:
> https://codereview.chromium.org/1269383005/
>
> Original issue's description:
> > Add channel-specific product logo to chrome://help
> >
> > BUG=511000
> >
> > Committed: https://crrev.com/9836302ea4ffb887ce6ffa597c1ee5484d2f1091
> > Cr-Commit-Position: refs/heads/master@{#342183}
>
> TBR=oshima@chromium.org,dbeam@chromium.org,estade@chromium.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=511000
>
> Committed: https://crrev.com/abd20f67987aaa47bb47e61288ec92b4ab761521
> Cr-Commit-Position: refs/heads/master@{#342324}

TBR=oshima@chromium.org,dbeam@chromium.org,tommi@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=511000

Review URL: https://codereview.chromium.org/1279093002

Cr-Commit-Position: refs/heads/master@{#342369}
parent 8ff878a8
......@@ -603,6 +603,9 @@
<structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_16" file="google_chrome/product_logo_16.png" />
<structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_26" file="google_chrome/product_logo_26.png" />
<structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_32" file="google_chrome/product_logo_32.png" />
<structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_32_BETA" file="google_chrome/product_logo_32_beta.png" />
<structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_32_CANARY" file="google_chrome/product_logo_32_canary.png" />
<structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_32_DEV" file="google_chrome/product_logo_32_dev.png" />
<structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_NAME_48" file="google_chrome/product_logo_name_48.png" />
<structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_WHITE" file="google_chrome/product_logo_white.png" />
</if>
......
<div class="content-area">
<div id="about-container">
<img id="product-logo" src="chrome://theme/IDR_PRODUCT_LOGO_32" alt="">
<img id="product-logo" src="chrome://help-frame/current-channel-logo"
alt="">
<div id="product-description">
<h2 i18n-content="aboutProductTitle"></h2>
<span i18n-content="aboutProductDescription"></span>
......
......@@ -6,11 +6,14 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/webui/help/help_handler.h"
#include "chrome/common/channel_info.h"
#include "chrome/common/url_constants.h"
#include "components/version_info/version_info.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_ui.h"
#include "content/public/browser/web_ui_data_source.h"
#include "grit/browser_resources.h"
#include "grit/theme_resources.h"
namespace {
......@@ -24,6 +27,35 @@ content::WebUIDataSource* CreateAboutPageHTMLSource() {
source->AddResourcePath("channel_change_page.js", IDR_CHANNEL_CHANGE_PAGE_JS);
source->SetDefaultResource(IDR_HELP_HTML);
source->DisableDenyXFrameOptions();
int product_logo = 0;
switch (chrome::GetChannel()) {
#if defined(GOOGLE_CHROME_BUILD)
case version_info::Channel::CANARY:
product_logo = IDR_PRODUCT_LOGO_32_CANARY;
break;
case version_info::Channel::DEV:
product_logo = IDR_PRODUCT_LOGO_32_DEV;
break;
case version_info::Channel::BETA:
product_logo = IDR_PRODUCT_LOGO_32_BETA;
break;
case version_info::Channel::STABLE:
product_logo = IDR_PRODUCT_LOGO_32;
break;
#else
case version_info::Channel::CANARY:
case version_info::Channel::DEV:
case version_info::Channel::BETA:
case version_info::Channel::STABLE:
NOTREACHED();
#endif
case version_info::Channel::UNKNOWN:
product_logo = IDR_PRODUCT_LOGO_32;
break;
}
source->AddResourcePath("current-channel-logo", product_logo);
return source;
}
......
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