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

Side by Side Diff: chrome/browser/ui/webui/chromeos/certificate_manager_dialog_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/certificate_manager_dialog_ui.h" 5 #include "chrome/browser/ui/webui/chromeos/certificate_manager_dialog_ui.h"
6 6
7 #include "base/memory/ref_counted_memory.h" 7 #include "base/memory/ref_counted_memory.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/chromeos/system/input_device_settings.h" 10 #include "chrome/browser/chromeos/system/input_device_settings.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 void CertificateManagerDialogHTMLSource::StartDataRequest( 70 void CertificateManagerDialogHTMLSource::StartDataRequest(
71 const std::string& path, 71 const std::string& path,
72 int render_process_id, 72 int render_process_id,
73 int render_frame_id, 73 int render_frame_id,
74 const content::URLDataSource::GotDataCallback& callback) { 74 const content::URLDataSource::GotDataCallback& callback) {
75 scoped_refptr<base::RefCountedMemory> response_bytes; 75 scoped_refptr<base::RefCountedMemory> response_bytes;
76 webui::SetFontAndTextDirection(localized_strings_.get()); 76 webui::SetFontAndTextDirection(localized_strings_.get());
77 77
78 if (path == kLocalizedStringsFile) { 78 if (path == kLocalizedStringsFile) {
79 // Return dynamically-generated strings from memory. 79 // Return dynamically-generated strings from memory.
80 webui::UseVersion2 version;
81 std::string strings_js; 80 std::string strings_js;
82 webui::AppendJsonJS(localized_strings_.get(), &strings_js); 81 webui::AppendJsonJS(localized_strings_.get(), &strings_js);
83 response_bytes = base::RefCountedString::TakeString(&strings_js); 82 response_bytes = base::RefCountedString::TakeString(&strings_js);
84 } else { 83 } else {
85 // Return (and cache) the main options html page as the default. 84 // Return (and cache) the main options html page as the default.
86 response_bytes = ui::ResourceBundle::GetSharedInstance(). 85 response_bytes = ui::ResourceBundle::GetSharedInstance().
87 LoadDataResourceBytes(IDR_CERT_MANAGER_DIALOG_HTML); 86 LoadDataResourceBytes(IDR_CERT_MANAGER_DIALOG_HTML);
88 } 87 }
89 88
90 callback.Run(response_bytes.get()); 89 callback.Run(response_bytes.get());
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 if (!initialized_handlers_) { 133 if (!initialized_handlers_) {
135 core_handler_->InitializeHandler(); 134 core_handler_->InitializeHandler();
136 cert_handler_->InitializeHandler(); 135 cert_handler_->InitializeHandler();
137 initialized_handlers_ = true; 136 initialized_handlers_ = true;
138 } 137 }
139 core_handler_->InitializePage(); 138 core_handler_->InitializePage();
140 cert_handler_->InitializePage(); 139 cert_handler_->InitializePage();
141 } 140 }
142 141
143 } // namespace chromeos 142 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/bluetooth_pairing_ui.cc ('k') | chrome/browser/ui/webui/chromeos/charger_replacement_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698