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

Side by Side Diff: chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc

Issue 588363002: WebUI: Update some more uses of the old-style i18ntemplate/LocalStrings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: IDS_CANCEL change is in a different cl 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/sim_unlock_ui.h" 5 #include "chrome/browser/ui/webui/chromeos/sim_unlock_ui.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_CHANGE_PIN_MESSAGE)); 322 IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_CHANGE_PIN_MESSAGE));
323 strings.SetString("oldPin", l10n_util::GetStringUTF16( 323 strings.SetString("oldPin", l10n_util::GetStringUTF16(
324 IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_CHANGE_PIN_OLD_PIN)); 324 IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_CHANGE_PIN_OLD_PIN));
325 325
326 webui::SetFontAndTextDirection(&strings); 326 webui::SetFontAndTextDirection(&strings);
327 327
328 static const base::StringPiece html( 328 static const base::StringPiece html(
329 ResourceBundle::GetSharedInstance().GetRawDataResource( 329 ResourceBundle::GetSharedInstance().GetRawDataResource(
330 IDR_SIM_UNLOCK_HTML)); 330 IDR_SIM_UNLOCK_HTML));
331 331
332 webui::UseVersion2 version2;
332 std::string full_html = webui::GetI18nTemplateHtml(html, &strings); 333 std::string full_html = webui::GetI18nTemplateHtml(html, &strings);
333 334
334 callback.Run(base::RefCountedString::TakeString(&full_html)); 335 callback.Run(base::RefCountedString::TakeString(&full_html));
335 } 336 }
336 337
337 // SimUnlockHandler ------------------------------------------------------------ 338 // SimUnlockHandler ------------------------------------------------------------
338 339
339 SimUnlockHandler::SimUnlockHandler() 340 SimUnlockHandler::SimUnlockHandler()
340 : state_(SIM_UNLOCK_LOADING), 341 : state_(SIM_UNLOCK_LOADING),
341 dialog_mode_(SimDialogDelegate::SIM_DIALOG_UNLOCK), 342 dialog_mode_(SimDialogDelegate::SIM_DIALOG_UNLOCK),
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 SimUnlockHandler* handler = new SimUnlockHandler(); 760 SimUnlockHandler* handler = new SimUnlockHandler();
760 web_ui->AddMessageHandler(handler); 761 web_ui->AddMessageHandler(handler);
761 SimUnlockUIHTMLSource* html_source = new SimUnlockUIHTMLSource(); 762 SimUnlockUIHTMLSource* html_source = new SimUnlockUIHTMLSource();
762 763
763 // Set up the chrome://sim-unlock/ source. 764 // Set up the chrome://sim-unlock/ source.
764 Profile* profile = Profile::FromWebUI(web_ui); 765 Profile* profile = Profile::FromWebUI(web_ui);
765 content::URLDataSource::Add(profile, html_source); 766 content::URLDataSource::Add(profile, html_source);
766 } 767 }
767 768
768 } // namespace chromeos 769 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc ('k') | chrome/browser/ui/webui/system_info_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698