Commit 1459abf9 authored by isherman's avatar isherman Committed by Commit bot

[Easy Unlock] Update strings to inform users about Bluetooth use and to tell a clearer story.

BUG=409100
R=tengs@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#296756}
parent 3537d871
This diff is collapsed.
......@@ -24,6 +24,8 @@
#if defined(OS_CHROMEOS)
#include "chrome/browser/chromeos/chromeos_utils.h"
#include "components/user_manager/user.h"
#include "components/user_manager/user_manager.h"
#endif
namespace extensions {
......@@ -96,6 +98,18 @@ bool EasyUnlockPrivateGetStringsFunction::RunSync() {
const base::string16 device_type = base::ASCIIToUTF16("Chromeschnozzle");
#endif // defined(OS_CHROMEOS)
#if defined(OS_CHROMEOS)
const user_manager::UserManager* manager = user_manager::UserManager::Get();
const user_manager::User* user = manager ? manager->GetActiveUser() : NULL;
const std::string user_email_utf8 =
user ? user->display_email() : std::string();
const base::string16 user_email = base::UTF8ToUTF16(user_email_utf8);
#else
// TODO(isherman): Set an appropriate user display email for non-ChromeOS
// platforms.
const base::string16 user_email = base::UTF8ToUTF16("superman@example.com");
#endif // defined(OS_CHROMEOS)
// Common strings.
strings->SetString(
"learnMoreLinkTitle",
......@@ -143,12 +157,9 @@ bool EasyUnlockPrivateGetStringsFunction::RunSync() {
IDS_EASY_UNLOCK_SETUP_INTRO_HEADER_TITLE, device_type));
strings->SetString(
"setupIntroHeaderText",
l10n_util::GetStringFUTF16(
IDS_EASY_UNLOCK_SETUP_INTRO_HEADER_TEXT, device_type));
strings->SetString(
"setupIntroHeaderFootnote",
l10n_util::GetStringUTF16(
IDS_EASY_UNLOCK_SETUP_INTRO_HEADER_FOOTNOTE));
l10n_util::GetStringFUTF16(IDS_EASY_UNLOCK_SETUP_INTRO_HEADER_TEXT,
device_type,
user_email));
strings->SetString(
"setupIntroFindPhoneButtonLabel",
l10n_util::GetStringUTF16(
......@@ -231,19 +242,8 @@ bool EasyUnlockPrivateGetStringsFunction::RunSync() {
l10n_util::GetStringFUTF16(
IDS_EASY_UNLOCK_SETUP_ERROR_CONNECTING_TO_PHONE, device_type));
// TODO(isherman): Remove these strings once the app has been updated.
strings->SetString(
"notificationTitle",
l10n_util::GetStringFUTF16(IDS_EASY_UNLOCK_SETUP_NOTIFICATION_TITLE,
device_type));
strings->SetString(
"notificationMessage",
l10n_util::GetStringFUTF16(IDS_EASY_UNLOCK_SETUP_NOTIFICATION_MESSAGE,
device_type));
strings->SetString(
"notificationButtonTitle",
l10n_util::GetStringUTF16(
IDS_EASY_UNLOCK_SETUP_NOTIFICATION_BUTTON_TITLE));
// TODO(isherman): Remove this string once the app has been updated.
strings->SetString("setupIntroHeaderFootnote", base::string16());
SetResult(strings.release());
return true;
......
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