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

Unified Diff: third_party/zlib/google/zip_reader.cc

Issue 1176473004: zlib: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/zlib/google/zip_reader.cc
diff --git a/third_party/zlib/google/zip_reader.cc b/third_party/zlib/google/zip_reader.cc
index 59d96da14263cbfb88d2230e8250396152e8b85c..c9f728c051ef1ec8a7c758aef58fb4117283936b 100644
--- a/third_party/zlib/google/zip_reader.cc
+++ b/third_party/zlib/google/zip_reader.cc
@@ -10,6 +10,7 @@
#include "base/message_loop/message_loop.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/thread_task_runner_handle.h"
#include "third_party/zlib/google/zip_internal.h"
#if defined(USE_SYSTEM_MINIZIP)
@@ -355,24 +356,24 @@ void ZipReader::ExtractCurrentEntryToFilePathAsync(
// If this is a directory, just create it and return.
if (current_entry_info()->is_directory()) {
if (base::CreateDirectory(output_file_path)) {
- base::MessageLoopProxy::current()->PostTask(FROM_HERE, success_callback);
+ base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, success_callback);
} else {
DVLOG(1) << "Unzip failed: unable to create directory.";
- base::MessageLoopProxy::current()->PostTask(FROM_HERE, failure_callback);
+ base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, failure_callback);
}
return;
}
if (unzOpenCurrentFile(zip_file_) != UNZ_OK) {
DVLOG(1) << "Unzip failed: unable to open current zip entry.";
- base::MessageLoopProxy::current()->PostTask(FROM_HERE, failure_callback);
+ base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, failure_callback);
return;
}
base::FilePath output_dir_path = output_file_path.DirName();
if (!base::CreateDirectory(output_dir_path)) {
DVLOG(1) << "Unzip failed: unable to create containing directory.";
- base::MessageLoopProxy::current()->PostTask(FROM_HERE, failure_callback);
+ base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, failure_callback);
return;
}
@@ -382,7 +383,7 @@ void ZipReader::ExtractCurrentEntryToFilePathAsync(
if (!output_file.IsValid()) {
DVLOG(1) << "Unzip failed: unable to create platform file at "
<< output_file_path.value();
- base::MessageLoopProxy::current()->PostTask(FROM_HERE, failure_callback);
+ base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, failure_callback);
return;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698