Skip to content

Commit

Permalink
Add the app names to the loaded resources.
Browse files Browse the repository at this point in the history
This allows us to show a notice to users that the app is a replacement
for Get Help.

Bug: b/155145109
Change-Id: I122df6caa3c9d0b391f83eb14d71412f7996fec2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2189832
Reviewed-by: Patti <patricialor@chromium.org>
Commit-Queue: Rachel Carpenter <carpenterr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#767157}
  • Loading branch information
carpenterr authored and Commit Bot committed May 10, 2020
1 parent 71aceba commit 05d3bc1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Expand Up @@ -15,6 +15,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/chrome_pages.h"
#include "chrome/common/pref_names.h"
#include "chrome/grit/generated_resources.h"
#include "chromeos/components/help_app_ui/url_constants.h"
#include "chromeos/services/multidevice_setup/public/cpp/prefs.h"
#include "chromeos/system/statistics_provider.h"
Expand Down Expand Up @@ -43,6 +44,7 @@ base::Optional<std::string> ChromeHelpAppUIDelegate::OpenFeedbackDialog() {

void ChromeHelpAppUIDelegate::PopulateLoadTimeData(
content::WebUIDataSource* source) {
source->AddLocalizedString("getHelpName", IDS_GENIUS_APP_NAME);
// Add strings that can be pulled in.
source->AddString("boardName", base::SysInfo::GetLsbReleaseBoard());
source->AddString("chromeOSVersion", base::SysInfo::OperatingSystemVersion());
Expand Down
2 changes: 2 additions & 0 deletions chromeos/components/help_app_ui/help_app_untrusted_ui.cc
Expand Up @@ -9,6 +9,7 @@
#include "chromeos/grit/chromeos_help_app_bundle_resources.h"
#include "chromeos/grit/chromeos_help_app_bundle_resources_map.h"
#include "chromeos/grit/chromeos_help_app_resources.h"
#include "chromeos/strings/grit/chromeos_strings.h"
#include "content/public/browser/web_ui_data_source.h"
#include "ui/resources/grit/webui_resources.h"

Expand All @@ -31,6 +32,7 @@ content::WebUIDataSource* CreateHelpAppUntrustedDataSource(

// Add device and feature flags.
delegate->PopulateLoadTimeData(source);
source->AddLocalizedString("appName", IDS_HELP_APP_DISCOVER);

source->UseStringsJs();
source->AddFrameAncestor(GURL(kChromeUIHelpAppURL));
Expand Down

0 comments on commit 05d3bc1

Please sign in to comment.