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

Side by Side Diff: chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.cc

Issue 449673002: Provide localizable strings for Easy Unlock success notification. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_ api.h" 5 #include "chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_ api.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 bool EasyUnlockPrivateGetStringsFunction::RunSync() { 56 bool EasyUnlockPrivateGetStringsFunction::RunSync() {
57 scoped_ptr<base::DictionaryValue> strings(new base::DictionaryValue); 57 scoped_ptr<base::DictionaryValue> strings(new base::DictionaryValue);
58 58
59 #if defined(OS_CHROMEOS) 59 #if defined(OS_CHROMEOS)
60 const base::string16 device_type = chromeos::GetChromeDeviceType(); 60 const base::string16 device_type = chromeos::GetChromeDeviceType();
61 #else 61 #else
62 // TODO(isherman): Set an appropriate device name for non-ChromeOS devices. 62 // TODO(isherman): Set an appropriate device name for non-ChromeOS devices.
63 const base::string16 device_type = base::ASCIIToUTF16("Chromeschnozzle"); 63 const base::string16 device_type = base::ASCIIToUTF16("Chromeschnozzle");
64 #endif // defined(OS_CHROMEOS) 64 #endif // defined(OS_CHROMEOS)
65
66 // Setup notification strings.
65 strings->SetString( 67 strings->SetString(
66 "notificationTitle", 68 "setupNotificationTitle",
67 l10n_util::GetStringFUTF16(IDS_EASY_UNLOCK_NOTIFICATION_TITLE, 69 l10n_util::GetStringFUTF16(IDS_EASY_UNLOCK_SETUP_NOTIFICATION_TITLE,
68 device_type)); 70 device_type));
69 strings->SetString( 71 strings->SetString(
70 "notificationMessage", 72 "setupNotificationMessage",
71 l10n_util::GetStringFUTF16(IDS_EASY_UNLOCK_NOTIFICATION_MESSAGE, 73 l10n_util::GetStringFUTF16(IDS_EASY_UNLOCK_SETUP_NOTIFICATION_MESSAGE,
72 device_type)); 74 device_type));
73 strings->SetString( 75 strings->SetString(
74 "notificationButtonTitle", 76 "setupNotificationButtonTitle",
75 l10n_util::GetStringUTF16(IDS_EASY_UNLOCK_NOTIFICATION_BUTTON_TITLE)); 77 l10n_util::GetStringUTF16(
78 IDS_EASY_UNLOCK_SETUP_NOTIFICATION_BUTTON_TITLE));
76 79
77 // Set-up dialog strings. 80 // Success notification strings.
81 strings->SetString(
82 "successNotificationTitle",
83 l10n_util::GetStringUTF16(IDS_EASY_UNLOCK_SUCCESS_NOTIFICATION_TITLE));
84 strings->SetString(
85 "successNotificationMessage",
86 l10n_util::GetStringFUTF16(IDS_EASY_UNLOCK_SUCCESS_NOTIFICATION_MESSAGE,
87 device_type));
88
89 // Setup dialog strings.
78 // Step 1: Intro. 90 // Step 1: Intro.
79 strings->SetString( 91 strings->SetString(
80 "setupIntroHeaderTitle", 92 "setupIntroHeaderTitle",
81 l10n_util::GetStringFUTF16( 93 l10n_util::GetStringFUTF16(
82 IDS_EASY_UNLOCK_SETUP_INTRO_HEADER_TITLE, device_type)); 94 IDS_EASY_UNLOCK_SETUP_INTRO_HEADER_TITLE, device_type));
83 strings->SetString( 95 strings->SetString(
84 "setupIntroHeaderText", 96 "setupIntroHeaderText",
85 l10n_util::GetStringFUTF16( 97 l10n_util::GetStringFUTF16(
86 IDS_EASY_UNLOCK_SETUP_INTRO_HEADER_TEXT, device_type)); 98 IDS_EASY_UNLOCK_SETUP_INTRO_HEADER_TEXT, device_type));
87 strings->SetString( 99 strings->SetString(
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 strings->SetString( 158 strings->SetString(
147 "setupErrorBluetoothConnectionFailed", 159 "setupErrorBluetoothConnectionFailed",
148 l10n_util::GetStringFUTF16( 160 l10n_util::GetStringFUTF16(
149 IDS_EASY_UNLOCK_SETUP_ERROR_BLUETOOTH_CONNECTION_FAILED, 161 IDS_EASY_UNLOCK_SETUP_ERROR_BLUETOOTH_CONNECTION_FAILED,
150 device_type)); 162 device_type));
151 strings->SetString( 163 strings->SetString(
152 "setupErrorConnectingToPhone", 164 "setupErrorConnectingToPhone",
153 l10n_util::GetStringFUTF16( 165 l10n_util::GetStringFUTF16(
154 IDS_EASY_UNLOCK_SETUP_ERROR_CONNECTING_TO_PHONE, device_type)); 166 IDS_EASY_UNLOCK_SETUP_ERROR_CONNECTING_TO_PHONE, device_type));
155 167
168 // TODO(isherman): Remove these strings once the app has been updated.
169 strings->SetString(
170 "notificationTitle",
171 l10n_util::GetStringFUTF16(IDS_EASY_UNLOCK_SETUP_NOTIFICATION_TITLE,
172 device_type));
173 strings->SetString(
174 "notificationMessage",
175 l10n_util::GetStringFUTF16(IDS_EASY_UNLOCK_SETUP_NOTIFICATION_MESSAGE,
176 device_type));
177 strings->SetString(
178 "notificationButtonTitle",
179 l10n_util::GetStringUTF16(
180 IDS_EASY_UNLOCK_SETUP_NOTIFICATION_BUTTON_TITLE));
181
156 SetResult(strings.release()); 182 SetResult(strings.release());
157 return true; 183 return true;
158 } 184 }
159 185
160 EasyUnlockPrivatePerformECDHKeyAgreementFunction:: 186 EasyUnlockPrivatePerformECDHKeyAgreementFunction::
161 EasyUnlockPrivatePerformECDHKeyAgreementFunction() {} 187 EasyUnlockPrivatePerformECDHKeyAgreementFunction() {}
162 188
163 EasyUnlockPrivatePerformECDHKeyAgreementFunction:: 189 EasyUnlockPrivatePerformECDHKeyAgreementFunction::
164 ~EasyUnlockPrivatePerformECDHKeyAgreementFunction() {} 190 ~EasyUnlockPrivatePerformECDHKeyAgreementFunction() {}
165 191
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 if (seek_result.success) { 330 if (seek_result.success) {
305 SendResponse(true); 331 SendResponse(true);
306 } else { 332 } else {
307 SetError(seek_result.error_message); 333 SetError(seek_result.error_message);
308 SendResponse(false); 334 SendResponse(false);
309 } 335 }
310 } 336 }
311 337
312 } // namespace api 338 } // namespace api
313 } // namespace extensions 339 } // namespace extensions
OLDNEW
« 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