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

Side by Side Diff: chrome/browser/ui/webui/crashes_ui.cc

Issue 1995113002: Rename WebUI::CallJavascriptFunction to WebUI::CallJavascriptFunctionUnsafe (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/crashes_ui.h" 5 #include "chrome/browser/ui/webui/crashes_ui.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 base::StringValue version(version_info::GetVersionNumber()); 171 base::StringValue version(version_info::GetVersionNumber());
172 base::StringValue os_string(base::SysInfo::OperatingSystemName() + " " + 172 base::StringValue os_string(base::SysInfo::OperatingSystemName() + " " +
173 base::SysInfo::OperatingSystemVersion()); 173 base::SysInfo::OperatingSystemVersion());
174 174
175 std::vector<const base::Value*> args; 175 std::vector<const base::Value*> args;
176 args.push_back(&enabled); 176 args.push_back(&enabled);
177 args.push_back(&dynamic_backend); 177 args.push_back(&dynamic_backend);
178 args.push_back(&crash_list); 178 args.push_back(&crash_list);
179 args.push_back(&version); 179 args.push_back(&version);
180 args.push_back(&os_string); 180 args.push_back(&os_string);
181 web_ui()->CallJavascriptFunction(crash::kCrashesUIUpdateCrashList, args); 181 web_ui()->CallJavascriptFunctionUnsafe(crash::kCrashesUIUpdateCrashList,
182 args);
182 } 183 }
183 184
184 } // namespace 185 } // namespace
185 186
186 /////////////////////////////////////////////////////////////////////////////// 187 ///////////////////////////////////////////////////////////////////////////////
187 // 188 //
188 // CrashesUI 189 // CrashesUI
189 // 190 //
190 /////////////////////////////////////////////////////////////////////////////// 191 ///////////////////////////////////////////////////////////////////////////////
191 192
192 CrashesUI::CrashesUI(content::WebUI* web_ui) : WebUIController(web_ui) { 193 CrashesUI::CrashesUI(content::WebUI* web_ui) : WebUIController(web_ui) {
193 web_ui->AddMessageHandler(new CrashesDOMHandler()); 194 web_ui->AddMessageHandler(new CrashesDOMHandler());
194 195
195 // Set up the chrome://crashes/ source. 196 // Set up the chrome://crashes/ source.
196 Profile* profile = Profile::FromWebUI(web_ui); 197 Profile* profile = Profile::FromWebUI(web_ui);
197 content::WebUIDataSource::Add(profile, CreateCrashesUIHTMLSource()); 198 content::WebUIDataSource::Add(profile, CreateCrashesUIHTMLSource());
198 } 199 }
199 200
200 // static 201 // static
201 base::RefCountedMemory* CrashesUI::GetFaviconResourceBytes( 202 base::RefCountedMemory* CrashesUI::GetFaviconResourceBytes(
202 ui::ScaleFactor scale_factor) { 203 ui::ScaleFactor scale_factor) {
203 return ResourceBundle::GetSharedInstance().LoadDataResourceBytesForScale( 204 return ResourceBundle::GetSharedInstance().LoadDataResourceBytesForScale(
204 IDR_CRASH_SAD_FAVICON, scale_factor); 205 IDR_CRASH_SAD_FAVICON, scale_factor);
205 } 206 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/copresence_ui_handler.cc ('k') | chrome/browser/ui/webui/device_log_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698