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

Unified Diff: chrome/browser/ui/webui/chromeos/login/enterprise_oauth_enrollment_screen_handler.cc

Issue 14063018: Implemented argument wrapping for CallJS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Get rid of macro. Created 7 years, 8 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/ui/webui/chromeos/login/enterprise_oauth_enrollment_screen_handler.cc
diff --git a/chrome/browser/ui/webui/chromeos/login/enterprise_oauth_enrollment_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/enterprise_oauth_enrollment_screen_handler.cc
index 94f21be951a0430472e4f679d1ecc4fabc4946a5..fe0fcf572c4936de0d2d2ad760a0a7334951143a 100644
--- a/chrome/browser/ui/webui/chromeos/login/enterprise_oauth_enrollment_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/enterprise_oauth_enrollment_screen_handler.cc
@@ -412,9 +412,7 @@ void EnterpriseOAuthEnrollmentScreenHandler::HandleRetry() {
}
void EnterpriseOAuthEnrollmentScreenHandler::ShowStep(const char* step) {
- base::StringValue step_value(step);
- CallJS("oobe.OAuthEnrollmentScreen.showStep",
- step_value);
+ CallJS("oobe.OAuthEnrollmentScreen.showStep", std::string(step));
}
void EnterpriseOAuthEnrollmentScreenHandler::ShowError(int message_id,
@@ -426,16 +424,12 @@ void EnterpriseOAuthEnrollmentScreenHandler::ShowErrorMessage(
const std::string& message,
bool retry) {
RevokeTokens();
-
- base::StringValue message_value(message);
- base::FundamentalValue retry_value(retry);
- CallJS("oobe.OAuthEnrollmentScreen.showError", message_value, retry_value);
+ CallJS("oobe.OAuthEnrollmentScreen.showError", message, retry);
}
void EnterpriseOAuthEnrollmentScreenHandler::ShowWorking(int message_id) {
- const std::string message(l10n_util::GetStringUTF8(message_id));
- base::StringValue message_value(message);
- CallJS("oobe.OAuthEnrollmentScreen.showWorking", message_value);
+ CallJS("oobe.OAuthEnrollmentScreen.showWorking",
+ l10n_util::GetStringUTF8(message_id));
bartfab (slow) 2013/04/18 07:39:31 Nit: Better use GetStringUTF16(). GetStringUTF8()
ygorshenin1 2013/04/18 07:58:23 Done.
}
void EnterpriseOAuthEnrollmentScreenHandler::RevokeTokens() {

Powered by Google App Engine
This is Rietveld 408576698