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

Side by Side Diff: chrome/browser/ui/webui/device_log_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 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/device_log_ui.h" 5 #include "chrome/browser/ui/webui/device_log_ui.h"
6 6
7 #include <string> 7 #include <string>
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 23 matching lines...) Expand all
34 web_ui()->RegisterMessageCallback( 34 web_ui()->RegisterMessageCallback(
35 "DeviceLog.getLog", 35 "DeviceLog.getLog",
36 base::Bind(&DeviceLogMessageHandler::GetLog, base::Unretained(this))); 36 base::Bind(&DeviceLogMessageHandler::GetLog, base::Unretained(this)));
37 } 37 }
38 38
39 private: 39 private:
40 void GetLog(const base::ListValue* value) const { 40 void GetLog(const base::ListValue* value) const {
41 base::StringValue data(device_event_log::GetAsString( 41 base::StringValue data(device_event_log::GetAsString(
42 device_event_log::NEWEST_FIRST, "json", "", 42 device_event_log::NEWEST_FIRST, "json", "",
43 device_event_log::LOG_LEVEL_DEBUG, 0)); 43 device_event_log::LOG_LEVEL_DEBUG, 0));
44 web_ui()->CallJavascriptFunction("DeviceLogUI.getLogCallback", data); 44 web_ui()->CallJavascriptFunctionUnsafe("DeviceLogUI.getLogCallback", data);
45 } 45 }
46 46
47 DISALLOW_COPY_AND_ASSIGN(DeviceLogMessageHandler); 47 DISALLOW_COPY_AND_ASSIGN(DeviceLogMessageHandler);
48 }; 48 };
49 49
50 } // namespace 50 } // namespace
51 51
52 DeviceLogUI::DeviceLogUI(content::WebUI* web_ui) 52 DeviceLogUI::DeviceLogUI(content::WebUI* web_ui)
53 : content::WebUIController(web_ui) { 53 : content::WebUIController(web_ui) {
54 web_ui->AddMessageHandler(new DeviceLogMessageHandler()); 54 web_ui->AddMessageHandler(new DeviceLogMessageHandler());
(...skipping 29 matching lines...) Expand all
84 html->SetDefaultResource(IDR_DEVICE_LOG_UI_HTML); 84 html->SetDefaultResource(IDR_DEVICE_LOG_UI_HTML);
85 85
86 content::WebUIDataSource::Add(web_ui->GetWebContents()->GetBrowserContext(), 86 content::WebUIDataSource::Add(web_ui->GetWebContents()->GetBrowserContext(),
87 html); 87 html);
88 } 88 }
89 89
90 DeviceLogUI::~DeviceLogUI() { 90 DeviceLogUI::~DeviceLogUI() {
91 } 91 }
92 92
93 } // namespace chromeos 93 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/crashes_ui.cc ('k') | chrome/browser/ui/webui/domain_reliability_internals_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698