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

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: 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/resource_bundle.cc
diff --git a/ui/base/resource/resource_bundle.cc b/ui/base/resource/resource_bundle.cc
index b5f8f6138d17026545e4d70b0e7cafe29c60ad48..c2ad9c8bcabda3bdec3a3c14cf03380aa10937df 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."
« chrome/renderer/spellchecker/hunspell_engine.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