Commit 215b1810 authored by Evan Stade's avatar Evan Stade Committed by Commit Bot

Add OS name to ash_strings.grd

Chrome OS should know its own name. This allows us to move one more
reference to MessageCenter from the Chrome process to Ash.

Unlike chromium_strings.grd/google_chrome_strings.grd, the branded and
unbranded strings both live in ash_strings.grd. This should be OK
because the split grd files are both part of the src checkout, and
are probably only separate because google_chrome_strings.grd used to
be in src-internal.

Bug: 578868
Change-Id: If7da91e2e291c7d9b467aa9a51b5af671a54b98f
Reviewed-on: https://chromium-review.googlesource.com/923559Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Evan Stade <estade@chromium.org>
Cr-Commit-Position: refs/heads/master@{#537806}
parent 3eb89f29
...@@ -1226,6 +1226,16 @@ Subsequent notifications, windows and dialogs may be split between desktops. ...@@ -1226,6 +1226,16 @@ Subsequent notifications, windows and dialogs may be split between desktops.
<message name="IDS_ASH_MESSAGE_CENTER_NO_NOTIFIERS" desc="The message displayed in the message center when there are no notification sources."> <message name="IDS_ASH_MESSAGE_CENTER_NO_NOTIFIERS" desc="The message displayed in the message center when there are no notification sources.">
Nothing to see just yet Nothing to see just yet
</message> </message>
<if expr="is_chrome_branded">
<message name="IDS_ASH_MESSAGE_CENTER_SYSTEM_APP_NAME" desc="The source of a system-generated notification, as displayed to the user.">
Chrome OS
</message>
</if>
<if expr="not is_chrome_branded">
<message name="IDS_ASH_MESSAGE_CENTER_SYSTEM_APP_NAME" desc="The source of a system-generated notification, as displayed to the user.">
Chromium OS
</message>
</if>
<!-- Window Control --> <!-- Window Control -->
<message name="IDS_ASH_WINDOW_CONTROL_ACCNAME_BACK" desc="The accessible name for the back button on the window frame."> <message name="IDS_ASH_WINDOW_CONTROL_ACCNAME_BACK" desc="The accessible name for the back button on the window frame.">
......
...@@ -6,7 +6,9 @@ ...@@ -6,7 +6,9 @@
#include "ash/public/cpp/ash_switches.h" #include "ash/public/cpp/ash_switches.h"
#include "ash/public/cpp/vector_icons/vector_icons.h" #include "ash/public/cpp/vector_icons/vector_icons.h"
#include "ash/strings/grit/ash_strings.h"
#include "base/command_line.h" #include "base/command_line.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/message_center/message_center.h" #include "ui/message_center/message_center.h"
#include "ui/message_center/public/cpp/notification.h" #include "ui/message_center/public/cpp/notification.h"
#include "ui/message_center/public/cpp/notification_delegate.h" #include "ui/message_center/public/cpp/notification_delegate.h"
...@@ -111,6 +113,11 @@ MessageCenterController::MessageCenterController() ...@@ -111,6 +113,11 @@ MessageCenterController::MessageCenterController()
message_center::RegisterVectorIcon(kNotificationVpnIcon); message_center::RegisterVectorIcon(kNotificationVpnIcon);
message_center::RegisterVectorIcon(kNotificationWarningIcon); message_center::RegisterVectorIcon(kNotificationWarningIcon);
message_center::RegisterVectorIcon(kNotificationWifiOffIcon); message_center::RegisterVectorIcon(kNotificationWifiOffIcon);
// Set the system notification source display name ("Chrome OS" or "Chromium
// OS").
message_center::MessageCenter::Get()->SetSystemNotificationAppName(
l10n_util::GetStringUTF16(IDS_ASH_MESSAGE_CENTER_SYSTEM_APP_NAME));
} }
MessageCenterController::~MessageCenterController() = default; MessageCenterController::~MessageCenterController() = default;
......
...@@ -9,6 +9,9 @@ assert(is_chromeos) ...@@ -9,6 +9,9 @@ assert(is_chromeos)
grit("strings") { grit("strings") {
source = "../ash_strings.grd" source = "../ash_strings.grd"
defines = [ "is_chrome_branded=$is_chrome_branded" ]
outputs = [ outputs = [
"grit/ash_strings.h", "grit/ash_strings.h",
"ash_strings_am.pak", "ash_strings_am.pak",
......
...@@ -112,7 +112,6 @@ ...@@ -112,7 +112,6 @@
#include "chrome/common/chrome_switches.h" #include "chrome/common/chrome_switches.h"
#include "chrome/common/logging_chrome.h" #include "chrome/common/logging_chrome.h"
#include "chrome/common/pref_names.h" #include "chrome/common/pref_names.h"
#include "chrome/grit/chromium_strings.h"
#include "chromeos/accelerometer/accelerometer_reader.h" #include "chromeos/accelerometer/accelerometer_reader.h"
#include "chromeos/audio/audio_devices_pref_handler_impl.h" #include "chromeos/audio/audio_devices_pref_handler_impl.h"
#include "chromeos/audio/cras_audio_handler.h" #include "chromeos/audio/cras_audio_handler.h"
...@@ -179,13 +178,11 @@ ...@@ -179,13 +178,11 @@
#include "ui/base/ime/chromeos/ime_keyboard.h" #include "ui/base/ime/chromeos/ime_keyboard.h"
#include "ui/base/ime/chromeos/input_method_manager.h" #include "ui/base/ime/chromeos/input_method_manager.h"
#include "ui/base/ime/chromeos/input_method_util.h" #include "ui/base/ime/chromeos/input_method_util.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/touch/touch_device.h" #include "ui/base/touch/touch_device.h"
#include "ui/chromeos/events/event_rewriter_chromeos.h" #include "ui/chromeos/events/event_rewriter_chromeos.h"
#include "ui/chromeos/events/pref_names.h" #include "ui/chromeos/events/pref_names.h"
#include "ui/events/event_utils.h" #include "ui/events/event_utils.h"
#include "ui/keyboard/content/keyboard.h" #include "ui/keyboard/content/keyboard.h"
#include "ui/message_center/message_center.h"
#if BUILDFLAG(ENABLE_RLZ) #if BUILDFLAG(ENABLE_RLZ)
#include "components/rlz/rlz_tracker.h" #include "components/rlz/rlz_tracker.h"
...@@ -853,11 +850,6 @@ void ChromeBrowserMainPartsChromeos::PreProfileInit() { ...@@ -853,11 +850,6 @@ void ChromeBrowserMainPartsChromeos::PreProfileInit() {
<< " with hash: " << user_id_hash; << " with hash: " << user_id_hash;
} }
// Set the system notification source display name ("Chrome OS" or "Chromium
// OS").
message_center::MessageCenter::Get()->SetSystemNotificationAppName(
l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_OS_NAME));
g_browser_process->platform_part()->InitializeCrosComponentManager(); g_browser_process->platform_part()->InitializeCrosComponentManager();
} }
......
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