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

Unified Diff: chrome/browser/android/blimp/chrome_blimp_client_context_delegate.cc

Issue 2406203003: Added blimp support strings. (Closed)
Patch Set: Add entry in translation expectation script. Created 4 years, 2 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
Index: chrome/browser/android/blimp/chrome_blimp_client_context_delegate.cc
diff --git a/chrome/browser/android/blimp/chrome_blimp_client_context_delegate.cc b/chrome/browser/android/blimp/chrome_blimp_client_context_delegate.cc
index aa5c14da4b18343ecc9003d509918ea9b67de113..cbf9d67054d096c2b83d0e5bff6cc9acbf1e6709 100644
--- a/chrome/browser/android/blimp/chrome_blimp_client_context_delegate.cc
+++ b/chrome/browser/android/blimp/chrome_blimp_client_context_delegate.cc
@@ -10,6 +10,7 @@
#include "blimp/client/public/blimp_client_context.h"
#include "blimp/client/public/blimp_client_context_delegate.h"
#include "blimp/client/public/contents/blimp_contents.h"
+#include "blimp/client/support/resources/blimp_strings.h"
#include "chrome/browser/android/blimp/blimp_client_context_factory.h"
#include "chrome/browser/android/blimp/blimp_contents_profile_attachment.h"
#include "chrome/browser/profiles/profile.h"
@@ -18,6 +19,7 @@
#include "components/signin/core/browser/profile_identity_provider.h"
#include "components/signin/core/browser/signin_manager.h"
#include "net/base/net_errors.h"
+#include "ui/base/l10n/l10n_util.h"
ChromeBlimpClientContextDelegate::ChromeBlimpClientContextDelegate(
Profile* profile)
@@ -45,8 +47,10 @@ void ChromeBlimpClientContextDelegate::OnAssignmentConnectionAttempted(
// TODO(xingliu): All strings shown in the UI should be accessed through grd
// files. https://crbug.com/630687
std::stringstream ss;
- ss << "Blimp: Assignment failed, reason: " << result << ".";
- ShowMessage(base::UTF8ToUTF16(ss.str()), false);
+ ss << "Assignment failed, reason: " << result << ".";
+ base::string16 message =
+ blimp::string::BlimpPrefix(base::UTF8ToUTF16(ss.str()));
+ ShowMessage(message, false);
}
std::unique_ptr<IdentityProvider>
@@ -60,11 +64,15 @@ ChromeBlimpClientContextDelegate::CreateIdentityProvider() {
void ChromeBlimpClientContextDelegate::OnAuthenticationError(
const GoogleServiceAuthError& error) {
LOG(ERROR) << "GoogleAuth error : " << error.ToString();
- ShowMessage(base::UTF8ToUTF16("Blimp: Failed to get OAuth2 token."), false);
+ base::string16 message = blimp::string::BlimpPrefix(
+ l10n_util::GetStringUTF16(IDS_BLIMP_SIGNIN_GET_TOKEN_FAILED));
+ ShowMessage(message, false);
}
void ChromeBlimpClientContextDelegate::OnConnected() {
- ShowMessage(base::UTF8ToUTF16("Blimp: Connected."), true);
+ base::string16 message = blimp::string::BlimpPrefix(
+ l10n_util::GetStringUTF16(IDS_BLIMP_NETWORK_CONNECTED));
+ ShowMessage(message, true);
}
void ChromeBlimpClientContextDelegate::OnEngineDisconnected(int result) {
@@ -81,7 +89,7 @@ void ChromeBlimpClientContextDelegate::ShowMessage(
void ChromeBlimpClientContextDelegate::OnDisconnected(
const base::string16& reason) {
- std::stringstream ss;
- ss << "Blimp: Disconnected(" << reason << ").";
- ShowMessage(base::UTF8ToUTF16(ss.str()), false);
+ ShowMessage(blimp::string::BlimpPrefix(l10n_util::GetStringFUTF16(
+ IDS_BLIMP_NETWORK_DISCONNECTED, reason)),
+ false);
}

Powered by Google App Engine
This is Rietveld 408576698