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

Unified Diff: chrome/utility/extensions/extensions_handler.cc

Issue 865543002: WIP: Browser image decoding using Mojo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup and add DecodeImageBase64. Created 5 years, 11 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/utility/extensions/extensions_handler.h ('k') | chrome/utility/image_decoder_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/utility/extensions/extensions_handler.cc
diff --git a/chrome/utility/extensions/extensions_handler.cc b/chrome/utility/extensions/extensions_handler.cc
index 06d83c011380ef89f5575f28a5973a891d40b70b..100ee4a98bef911ff3c3f2130b19f6b17bf63ffc 100644
--- a/chrome/utility/extensions/extensions_handler.cc
+++ b/chrome/utility/extensions/extensions_handler.cc
@@ -86,7 +86,6 @@ bool ExtensionsHandler::OnMessageReceived(const IPC::Message& message) {
IPC_BEGIN_MESSAGE_MAP(ExtensionsHandler, message)
IPC_MESSAGE_HANDLER(ChromeUtilityMsg_UnpackExtension, OnUnpackExtension)
IPC_MESSAGE_HANDLER(ChromeUtilityMsg_UnzipToDir, OnUnzipToDir)
- IPC_MESSAGE_HANDLER(ChromeUtilityMsg_DecodeImageBase64, OnDecodeImageBase64)
IPC_MESSAGE_HANDLER(ChromeUtilityMsg_CheckMediaFile, OnCheckMediaFile)
#if defined(OS_WIN)
IPC_MESSAGE_HANDLER(ChromeUtilityMsg_ParseITunesPrefXml,
@@ -153,23 +152,6 @@ void ExtensionsHandler::OnUnzipToDir(const base::FilePath& zip_path,
ReleaseProcessIfNeeded();
}
-void ExtensionsHandler::OnDecodeImageBase64(
- const std::string& encoded_string) {
- std::string decoded_string;
-
- if (!base::Base64Decode(encoded_string, &decoded_string)) {
- Send(new ChromeUtilityHostMsg_DecodeImage_Failed());
- return;
- }
-
- std::vector<unsigned char> decoded_vector(decoded_string.size());
- for (size_t i = 0; i < decoded_string.size(); ++i) {
- decoded_vector[i] = static_cast<unsigned char>(decoded_string[i]);
- }
-
- ChromeContentUtilityClient::DecodeImageAndSend(decoded_vector, false);
-}
-
void ExtensionsHandler::OnCheckMediaFile(
int64 milliseconds_of_decoding,
const IPC::PlatformFileForTransit& media_file) {
« no previous file with comments | « chrome/utility/extensions/extensions_handler.h ('k') | chrome/utility/image_decoder_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698