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

Unified Diff: ui/base/resource/data_pack.cc

Issue 109273002: Convert base::MemoryMappedFile to use File instead of PlatformFile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Posix GetSize Created 7 years 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: ui/base/resource/data_pack.cc
diff --git a/ui/base/resource/data_pack.cc b/ui/base/resource/data_pack.cc
index 8f8f18224448baf2b1762782dfcd96a535a16c42..56d74a2786855f7676d1b022ff82b5ad596c7195 100644
--- a/ui/base/resource/data_pack.cc
+++ b/ui/base/resource/data_pack.cc
@@ -84,9 +84,9 @@ bool DataPack::LoadFromPath(const base::FilePath& path) {
return LoadImpl();
}
-bool DataPack::LoadFromFile(base::PlatformFile file) {
+bool DataPack::LoadFromFile(base::File file) {
mmap_.reset(new base::MemoryMappedFile);
- if (!mmap_->Initialize(file)) {
+ if (!mmap_->Initialize(file.Pass())) {
cpu_(ooo_6.6-7.5) 2013/12/28 01:40:52 oh I had missed this .Pass()
DLOG(ERROR) << "Failed to mmap datapack";
UMA_HISTOGRAM_ENUMERATION("DataPack.Load", INIT_FAILED_FROM_FILE,
LOAD_ERRORS_COUNT);

Powered by Google App Engine
This is Rietveld 408576698