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

Unified Diff: ui/base/resource/resource_bundle.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
« ui/base/resource/data_pack.cc ('K') | « ui/base/resource/resource_bundle.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/resource/resource_bundle.cc
diff --git a/ui/base/resource/resource_bundle.cc b/ui/base/resource/resource_bundle.cc
index 22f191c36a5f3d2c74be2265e2a480c45498591a..4371e4fed6c73b30e95c06350e35e4243287548d 100644
--- a/ui/base/resource/resource_bundle.cc
+++ b/ui/base/resource/resource_bundle.cc
@@ -162,14 +162,14 @@ std::string ResourceBundle::InitSharedInstanceLocaleOnly(
// static
void ResourceBundle::InitSharedInstanceWithPakFile(
- base::PlatformFile pak_file, bool should_load_common_resources) {
+ base::File pak_file, bool should_load_common_resources) {
InitSharedInstance(NULL);
if (should_load_common_resources)
g_shared_instance_->LoadCommonResources();
scoped_ptr<DataPack> data_pack(
new DataPack(SCALE_FACTOR_100P));
- if (!data_pack->LoadFromFile(pak_file)) {
+ if (!data_pack->LoadFromFile(pak_file.Pass())) {
NOTREACHED() << "failed to load pak file";
return;
}
@@ -219,11 +219,11 @@ void ResourceBundle::AddOptionalDataPackFromPath(const base::FilePath& path,
AddDataPackFromPathInternal(path, scale_factor, true);
}
-void ResourceBundle::AddDataPackFromFile(base::PlatformFile file,
+void ResourceBundle::AddDataPackFromFile(base::File file,
ScaleFactor scale_factor) {
scoped_ptr<DataPack> data_pack(
new DataPack(scale_factor));
- if (data_pack->LoadFromFile(file)) {
+ if (data_pack->LoadFromFile(file.Pass())) {
AddDataPack(data_pack.release());
} else {
LOG(ERROR) << "Failed to load data pack from file."
« ui/base/resource/data_pack.cc ('K') | « ui/base/resource/resource_bundle.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698