Index: chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.cc |
diff --git a/chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.cc |
index 36ec1cd5138fa01edd11a087597374b04c339157..60cd3650a0db4391dc91d8c02e0b6d93ab48a6ae 100644 |
--- a/chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.cc |
+++ b/chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.cc |
@@ -180,8 +180,8 @@ void ChangePictureOptionsHandler::SendDefaultImages() { |
default_user_image::GetDefaultImageDescription(i)); |
image_urls.Append(image_data.release()); |
} |
- web_ui()->CallJavascriptFunction("ChangePictureOptions.setDefaultImages", |
- image_urls); |
+ web_ui()->CallJavascriptFunctionUnsafe( |
+ "ChangePictureOptions.setDefaultImages", image_urls); |
} |
void ChangePictureOptionsHandler::HandleChooseFile( |
@@ -286,7 +286,7 @@ void ChangePictureOptionsHandler::SendSelectedImage() { |
// User has image from the current set of default images. |
base::StringValue image_url( |
default_user_image::GetDefaultImageUrl(previous_image_index_)); |
- web_ui()->CallJavascriptFunction( |
+ web_ui()->CallJavascriptFunctionUnsafe( |
"ChangePictureOptions.setSelectedImage", image_url); |
} else { |
// User has an old default image, so present it in the same manner as a |
@@ -302,8 +302,8 @@ void ChangePictureOptionsHandler::SendProfileImage(const gfx::ImageSkia& image, |
bool should_select) { |
base::StringValue data_url(webui::GetBitmapDataUrl(*image.bitmap())); |
base::FundamentalValue select(should_select); |
- web_ui()->CallJavascriptFunction("ChangePictureOptions.setProfileImage", |
- data_url, select); |
+ web_ui()->CallJavascriptFunctionUnsafe("ChangePictureOptions.setProfileImage", |
+ data_url, select); |
} |
void ChangePictureOptionsHandler::UpdateProfileImage() { |
@@ -321,7 +321,8 @@ void ChangePictureOptionsHandler::UpdateProfileImage() { |
void ChangePictureOptionsHandler::SendOldImage(const std::string& image_url) { |
previous_image_url_ = image_url; |
base::StringValue url(image_url); |
- web_ui()->CallJavascriptFunction("ChangePictureOptions.setOldImage", url); |
+ web_ui()->CallJavascriptFunctionUnsafe("ChangePictureOptions.setOldImage", |
+ url); |
} |
void ChangePictureOptionsHandler::HandleSelectImage( |
@@ -421,8 +422,8 @@ void ChangePictureOptionsHandler::SetImageFromCamera( |
void ChangePictureOptionsHandler::SetCameraPresent(bool present) { |
base::FundamentalValue present_value(present); |
- web_ui()->CallJavascriptFunction("ChangePictureOptions.setCameraPresent", |
- present_value); |
+ web_ui()->CallJavascriptFunctionUnsafe( |
+ "ChangePictureOptions.setCameraPresent", present_value); |
} |
void ChangePictureOptionsHandler::OnCameraPresenceCheckDone( |