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

Unified Diff: chrome/browser/ui/webui/sync_file_system_internals/sync_file_system_internals_handler.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
Index: chrome/browser/ui/webui/sync_file_system_internals/sync_file_system_internals_handler.cc
diff --git a/chrome/browser/ui/webui/sync_file_system_internals/sync_file_system_internals_handler.cc b/chrome/browser/ui/webui/sync_file_system_internals/sync_file_system_internals_handler.cc
index f748c32645bf5819cb354a3136f0787ce44c0878..600045ad1dc057c90874635eef7f8d8be677ebfd 100644
--- a/chrome/browser/ui/webui/sync_file_system_internals/sync_file_system_internals_handler.cc
+++ b/chrome/browser/ui/webui/sync_file_system_internals/sync_file_system_internals_handler.cc
@@ -83,8 +83,8 @@ void SyncFileSystemInternalsHandler::OnSyncStateUpdated(
// TODO(calvinlo): OnSyncStateUpdated should be updated to also provide the
// notification mechanism (XMPP or Polling).
- web_ui()->CallJavascriptFunction("SyncService.onGetServiceStatus",
- base::StringValue(state_string));
+ web_ui()->CallJavascriptFunctionUnsafe("SyncService.onGetServiceStatus",
+ base::StringValue(state_string));
}
void SyncFileSystemInternalsHandler::OnFileSynced(
@@ -106,7 +106,7 @@ void SyncFileSystemInternalsHandler::OnLogRecorded(
std::unique_ptr<base::ListValue> details(new base::ListValue);
details->AppendStrings(task_log.details);
dict.Set("details", details.release());
- web_ui()->CallJavascriptFunction("TaskLog.onTaskLogRecorded", dict);
+ web_ui()->CallJavascriptFunctionUnsafe("TaskLog.onTaskLogRecorded", dict);
}
void SyncFileSystemInternalsHandler::GetServiceStatus(
@@ -118,8 +118,8 @@ void SyncFileSystemInternalsHandler::GetServiceStatus(
state_enum = sync_service->GetSyncServiceState();
const std::string state_string = extensions::api::sync_file_system::ToString(
extensions::SyncServiceStateToExtensionEnum(state_enum));
- web_ui()->CallJavascriptFunction("SyncService.onGetServiceStatus",
- base::StringValue(state_string));
+ web_ui()->CallJavascriptFunctionUnsafe("SyncService.onGetServiceStatus",
+ base::StringValue(state_string));
}
void SyncFileSystemInternalsHandler::GetNotificationSource(
@@ -130,8 +130,9 @@ void SyncFileSystemInternalsHandler::GetNotificationSource(
return;
bool xmpp_enabled = drive_notification_manager->push_notification_enabled();
std::string notification_source = xmpp_enabled ? "XMPP" : "Polling";
- web_ui()->CallJavascriptFunction("SyncService.onGetNotificationSource",
- base::StringValue(notification_source));
+ web_ui()->CallJavascriptFunctionUnsafe(
+ "SyncService.onGetNotificationSource",
+ base::StringValue(notification_source));
}
void SyncFileSystemInternalsHandler::GetLog(
@@ -162,7 +163,7 @@ void SyncFileSystemInternalsHandler::GetLog(
if (list.empty())
return;
- web_ui()->CallJavascriptFunction("SyncService.onGetLog", list);
+ web_ui()->CallJavascriptFunctionUnsafe("SyncService.onGetLog", list);
}
void SyncFileSystemInternalsHandler::ClearLogs(const base::ListValue* args) {

Powered by Google App Engine
This is Rietveld 408576698