Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1854)

Unified Diff: chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.cc

Issue 597803002: [Easy Unlock] Update strings to inform users about Bluetooth use and to tell a clearer story. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile on non-ChromeOS platforms Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.cc
diff --git a/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.cc b/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.cc
index 0421dfa69faca9ded3fc7f4ca9e494e4ecec2d3d..b8378956e89a8d64f4ea6e1b027b739d563d2a12 100644
--- a/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.cc
+++ b/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.cc
@@ -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 {
@@ -102,6 +104,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",
@@ -149,12 +163,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(
@@ -237,19 +248,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;
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698