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

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

Issue 599653003: Remove old template html boilerplate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bydefault
Patch Set: fix android Created 6 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 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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_CHANGE_PIN_MESSAGE)); 323 IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_CHANGE_PIN_MESSAGE));
324 strings.SetString("oldPin", l10n_util::GetStringUTF16( 324 strings.SetString("oldPin", l10n_util::GetStringUTF16(
325 IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_CHANGE_PIN_OLD_PIN)); 325 IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_CHANGE_PIN_OLD_PIN));
326 326
327 webui::SetFontAndTextDirection(&strings); 327 webui::SetFontAndTextDirection(&strings);
328 328
329 static const base::StringPiece html( 329 static const base::StringPiece html(
330 ResourceBundle::GetSharedInstance().GetRawDataResource( 330 ResourceBundle::GetSharedInstance().GetRawDataResource(
331 IDR_SIM_UNLOCK_HTML)); 331 IDR_SIM_UNLOCK_HTML));
332 332
333 webui::UseVersion2 version2;
334 std::string full_html = webui::GetI18nTemplateHtml(html, &strings); 333 std::string full_html = webui::GetI18nTemplateHtml(html, &strings);
335
336 callback.Run(base::RefCountedString::TakeString(&full_html)); 334 callback.Run(base::RefCountedString::TakeString(&full_html));
337 } 335 }
338 336
339 // SimUnlockHandler ------------------------------------------------------------ 337 // SimUnlockHandler ------------------------------------------------------------
340 338
341 SimUnlockHandler::SimUnlockHandler() 339 SimUnlockHandler::SimUnlockHandler()
342 : state_(SIM_UNLOCK_LOADING), 340 : state_(SIM_UNLOCK_LOADING),
343 dialog_mode_(SimDialogDelegate::SIM_DIALOG_UNLOCK), 341 dialog_mode_(SimDialogDelegate::SIM_DIALOG_UNLOCK),
344 pending_pin_operation_(false), 342 pending_pin_operation_(false),
345 weak_ptr_factory_(this) { 343 weak_ptr_factory_(this) {
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 SimUnlockHandler* handler = new SimUnlockHandler(); 759 SimUnlockHandler* handler = new SimUnlockHandler();
762 web_ui->AddMessageHandler(handler); 760 web_ui->AddMessageHandler(handler);
763 SimUnlockUIHTMLSource* html_source = new SimUnlockUIHTMLSource(); 761 SimUnlockUIHTMLSource* html_source = new SimUnlockUIHTMLSource();
764 762
765 // Set up the chrome://sim-unlock/ source. 763 // Set up the chrome://sim-unlock/ source.
766 Profile* profile = Profile::FromWebUI(web_ui); 764 Profile* profile = Profile::FromWebUI(web_ui);
767 content::URLDataSource::Add(profile, html_source); 765 content::URLDataSource::Add(profile, html_source);
768 } 766 }
769 767
770 } // namespace chromeos 768 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/set_time_ui.cc ('k') | chrome/browser/ui/webui/chromeos/slow_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698