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) { |