diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-24 21:55:45 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-24 21:55:45 +0000 |
commit | c3088cbb5cbd5c91b6c5602750ec327ff7963862 (patch) | |
tree | 4aac06d2b2541d9ef2744f719478f6c2c88b00c1 /ui/base/resource | |
parent | 47e870bf26f0c01dafe611ec03c0139c735063df (diff) | |
download | chromium_src-c3088cbb5cbd5c91b6c5602750ec327ff7963862.zip chromium_src-c3088cbb5cbd5c91b6c5602750ec327ff7963862.tar.gz chromium_src-c3088cbb5cbd5c91b6c5602750ec327ff7963862.tar.bz2 |
base: Move MemoryMappedFile out of file_util.h and into its own header file.
BUG=175002
TEST=base_unittests
R=brettw@chromium.org
TBR=erikwright@chromium.org,tommi@chromium.org,fischman@chromium.org,ben@chromium.org
Review URL: https://chromiumcodereview.appspot.com/12321062
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184356 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/base/resource')
-rw-r--r-- | ui/base/resource/data_pack.cc | 5 | ||||
-rw-r--r-- | ui/base/resource/data_pack.h | 7 |
2 files changed, 5 insertions, 7 deletions
diff --git a/ui/base/resource/data_pack.cc b/ui/base/resource/data_pack.cc index 793e963..4901a9b 100644 --- a/ui/base/resource/data_pack.cc +++ b/ui/base/resource/data_pack.cc @@ -7,6 +7,7 @@ #include <errno.h> #include "base/file_util.h" +#include "base/files/memory_mapped_file.h" #include "base/logging.h" #include "base/memory/ref_counted_memory.h" #include "base/metrics/histogram.h" @@ -72,7 +73,7 @@ DataPack::~DataPack() { } bool DataPack::LoadFromPath(const base::FilePath& path) { - mmap_.reset(new file_util::MemoryMappedFile); + mmap_.reset(new base::MemoryMappedFile); if (!mmap_->Initialize(path)) { DLOG(ERROR) << "Failed to mmap datapack"; UMA_HISTOGRAM_ENUMERATION("DataPack.Load", INIT_FAILED, @@ -84,7 +85,7 @@ bool DataPack::LoadFromPath(const base::FilePath& path) { } bool DataPack::LoadFromFile(base::PlatformFile file) { - mmap_.reset(new file_util::MemoryMappedFile); + mmap_.reset(new base::MemoryMappedFile); if (!mmap_->Initialize(file)) { DLOG(ERROR) << "Failed to mmap datapack"; UMA_HISTOGRAM_ENUMERATION("DataPack.Load", INIT_FAILED_FROM_FILE, diff --git a/ui/base/resource/data_pack.h b/ui/base/resource/data_pack.h index 40913cb..3935e6b 100644 --- a/ui/base/resource/data_pack.h +++ b/ui/base/resource/data_pack.h @@ -21,11 +21,8 @@ namespace base { class FilePath; -class RefCountedStaticMemory; -} - -namespace file_util { class MemoryMappedFile; +class RefCountedStaticMemory; } namespace ui { @@ -63,7 +60,7 @@ class UI_EXPORT DataPack : public ResourceHandle { bool LoadImpl(); // The memory-mapped data. - scoped_ptr<file_util::MemoryMappedFile> mmap_; + scoped_ptr<base::MemoryMappedFile> mmap_; // Number of resources in the data. size_t resource_count_; |