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

Unified Diff: chrome/browser/ui/webui/chromeos/nfc_debug_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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/webui/chromeos/network_ui.cc ('k') | chrome/browser/ui/webui/chromeos/power_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/chromeos/nfc_debug_ui.cc
diff --git a/chrome/browser/ui/webui/chromeos/nfc_debug_ui.cc b/chrome/browser/ui/webui/chromeos/nfc_debug_ui.cc
index 802877c87ca30c785939a17f9f23790d0d598a04..ac4b78446a787cbd888f0b9de038376d854bd4ee 100644
--- a/chrome/browser/ui/webui/chromeos/nfc_debug_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/nfc_debug_ui.cc
@@ -391,8 +391,8 @@ void NfcDebugMessageHandler::RegisterMessages() {
void NfcDebugMessageHandler::Initialize(const base::ListValue* args) {
bool nfc_available = NfcAdapterFactory::IsNfcAvailable();
base::FundamentalValue available(nfc_available);
- web_ui()->CallJavascriptFunction(kOnNfcAvailabilityDeterminedFunction,
- available);
+ web_ui()->CallJavascriptFunctionUnsafe(kOnNfcAvailabilityDeterminedFunction,
+ available);
if (!nfc_available) {
LOG(WARNING) << "NFC is not available on current platform.";
return;
@@ -416,7 +416,7 @@ void NfcDebugMessageHandler::SetAdapterPower(const base::ListValue* args) {
void NfcDebugMessageHandler::OnSetAdapterPowerError() {
LOG(ERROR) << "Failed to set NFC adapter power.";
- web_ui()->CallJavascriptFunction(kOnSetAdapterPowerFailedFunction);
+ web_ui()->CallJavascriptFunctionUnsafe(kOnSetAdapterPowerFailedFunction);
}
void NfcDebugMessageHandler::SetAdapterPolling(const base::ListValue* args) {
@@ -442,7 +442,7 @@ void NfcDebugMessageHandler::SetAdapterPolling(const base::ListValue* args) {
void NfcDebugMessageHandler::OnSetAdapterPollingError() {
LOG(ERROR) << "Failed to start/stop polling.";
- web_ui()->CallJavascriptFunction(kOnSetAdapterPollingFailedFunction);
+ web_ui()->CallJavascriptFunctionUnsafe(kOnSetAdapterPollingFailedFunction);
}
void NfcDebugMessageHandler::SubmitRecordForm(const base::ListValue* args) {
@@ -518,8 +518,8 @@ void NfcDebugMessageHandler::SubmitRecordForm(const base::ListValue* args) {
void NfcDebugMessageHandler::OnSubmitRecordFormFailed(
const std::string& error_message) {
LOG(ERROR) << "SubmitRecordForm failed: " << error_message;
- web_ui()->CallJavascriptFunction(kOnSubmitRecordFormFailedFunction,
- base::StringValue(error_message));
+ web_ui()->CallJavascriptFunctionUnsafe(kOnSubmitRecordFormFailedFunction,
+ base::StringValue(error_message));
}
void NfcDebugMessageHandler::OnGetAdapter(
@@ -645,19 +645,21 @@ void NfcDebugMessageHandler::GetRecordList(const NfcNdefMessage& message,
void NfcDebugMessageHandler::UpdateAdapterInfo() {
base::DictionaryValue data;
GetAdapterProperties(&data);
- web_ui()->CallJavascriptFunction(kOnNfcAdapterInfoChangedFunction, data);
+ web_ui()->CallJavascriptFunctionUnsafe(kOnNfcAdapterInfoChangedFunction,
+ data);
}
void NfcDebugMessageHandler::UpdatePeerInfo() {
base::DictionaryValue data;
GetPeerProperties(&data);
- web_ui()->CallJavascriptFunction(kOnNfcPeerDeviceInfoChangedFunction, data);
+ web_ui()->CallJavascriptFunctionUnsafe(kOnNfcPeerDeviceInfoChangedFunction,
+ data);
}
void NfcDebugMessageHandler::UpdateTagInfo() {
base::DictionaryValue data;
GetTagProperties(&data);
- web_ui()->CallJavascriptFunction(kOnNfcTagInfoChangedFunction, data);
+ web_ui()->CallJavascriptFunctionUnsafe(kOnNfcTagInfoChangedFunction, data);
}
} // namespace
« no previous file with comments | « chrome/browser/ui/webui/chromeos/network_ui.cc ('k') | chrome/browser/ui/webui/chromeos/power_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698