| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/ui/webui/chromeos/login/enterprise_enrollment_screen_ha
ndler.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/enterprise_enrollment_screen_ha
ndler.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
| 10 #include "base/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 | 180 |
| 181 // None of the strings used here currently have sync-specific wording in | 181 // None of the strings used here currently have sync-specific wording in |
| 182 // them. We have a unit test to catch if that happens. | 182 // them. We have a unit test to catch if that happens. |
| 183 localized_strings->SetString("introduction", ""); | 183 localized_strings->SetString("introduction", ""); |
| 184 localized_strings->SetString( | 184 localized_strings->SetString( |
| 185 "signinprefix", l10n_util::GetStringUTF16(IDS_SYNC_LOGIN_SIGNIN_PREFIX)); | 185 "signinprefix", l10n_util::GetStringUTF16(IDS_SYNC_LOGIN_SIGNIN_PREFIX)); |
| 186 localized_strings->SetString( | 186 localized_strings->SetString( |
| 187 "signinsuffix", l10n_util::GetStringUTF16(IDS_SYNC_LOGIN_SIGNIN_SUFFIX)); | 187 "signinsuffix", l10n_util::GetStringUTF16(IDS_SYNC_LOGIN_SIGNIN_SUFFIX)); |
| 188 localized_strings->SetString( | 188 localized_strings->SetString( |
| 189 "cannotbeblank", l10n_util::GetStringUTF16(IDS_SYNC_CANNOT_BE_BLANK)); | 189 "cannotbeblank", l10n_util::GetStringUTF16(IDS_SYNC_CANNOT_BE_BLANK)); |
| 190 localized_strings->SetString("emaillabel", | 190 localized_strings->SetString("emaillabel", l10n_util::GetStringUTF16( |
| 191 l10n_util::GetStringUTF16(IDS_SYNC_LOGIN_EMAIL)); | 191 IDS_SYNC_LOGIN_EMAIL_SAME_LINE)); |
| 192 localized_strings->SetString( | 192 localized_strings->SetString("passwordlabel", l10n_util::GetStringUTF16( |
| 193 "passwordlabel", l10n_util::GetStringUTF16(IDS_SYNC_LOGIN_PASSWORD)); | 193 IDS_SYNC_LOGIN_PASSWORD_SAME_LINE)); |
| 194 localized_strings->SetString( | 194 localized_strings->SetString( |
| 195 "invalidcredentials", | 195 "invalidcredentials", |
| 196 l10n_util::GetStringUTF16(IDS_SYNC_INVALID_USER_CREDENTIALS)); | 196 l10n_util::GetStringUTF16(IDS_SYNC_INVALID_USER_CREDENTIALS)); |
| 197 localized_strings->SetString("signin", | 197 localized_strings->SetString("signin", |
| 198 l10n_util::GetStringUTF16(IDS_SYNC_SIGNIN)); | 198 l10n_util::GetStringUTF16(IDS_SYNC_SIGNIN)); |
| 199 localized_strings->SetString( | 199 localized_strings->SetString( |
| 200 "couldnotconnect", | 200 "couldnotconnect", |
| 201 l10n_util::GetStringUTF16(IDS_SYNC_LOGIN_COULD_NOT_CONNECT)); | 201 l10n_util::GetStringUTF16(IDS_SYNC_LOGIN_COULD_NOT_CONNECT)); |
| 202 localized_strings->SetString("cancel", l10n_util::GetStringUTF16(IDS_CANCEL)); | 202 localized_strings->SetString("cancel", l10n_util::GetStringUTF16(IDS_CANCEL)); |
| 203 localized_strings->SetString( | 203 localized_strings->SetString( |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 base::JSONWriter::Write(&args, false, &json); | 300 base::JSONWriter::Write(&args, false, &json); |
| 301 | 301 |
| 302 RenderViewHost* render_view_host = | 302 RenderViewHost* render_view_host = |
| 303 web_ui_->tab_contents()->render_view_host(); | 303 web_ui_->tab_contents()->render_view_host(); |
| 304 render_view_host->ExecuteJavascriptInWebFrame( | 304 render_view_host->ExecuteJavascriptInWebFrame( |
| 305 ASCIIToUTF16("//iframe[@id='gaia-local-login']"), | 305 ASCIIToUTF16("//iframe[@id='gaia-local-login']"), |
| 306 UTF8ToUTF16("showGaiaLogin(" + json + ");")); | 306 UTF8ToUTF16("showGaiaLogin(" + json + ");")); |
| 307 } | 307 } |
| 308 | 308 |
| 309 } // namespace chromeos | 309 } // namespace chromeos |
| OLD | NEW |