summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorcjhopman@chromium.org <cjhopman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-10 19:18:04 +0000
committercjhopman@chromium.org <cjhopman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-10 19:18:04 +0000
commit6c26d9cf2d0ee13c4ab67040923c953c50e0d41b (patch)
tree0920a14cb3544ea100a21ebcb65b97b673472c33 /webkit
parent81f2dba7d7e3af616501d65920599dad4bb948e7 (diff)
downloadchromium_src-6c26d9cf2d0ee13c4ab67040923c953c50e0d41b.zip
chromium_src-6c26d9cf2d0ee13c4ab67040923c953c50e0d41b.tar.gz
chromium_src-6c26d9cf2d0ee13c4ab67040923c953c50e0d41b.tar.bz2
Add methods to add DataPack from open files
On Android, renderer sandboxing prevents us from opening files and so ResourceBundle is initialized with file descriptors passed in at process creation. This change adds methods to DataPack and ResourceBundle to support loading/initializing from PlatformFile in addition to the current FilePath. Also, the current methods are renamed so that the naming is consistent between these two files. BUG= TEST= Review URL: https://chromiumcodereview.appspot.com/10686005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145927 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/support/platform_support_android.cc2
-rw-r--r--webkit/support/platform_support_linux.cc2
-rw-r--r--webkit/support/platform_support_mac.mm2
-rw-r--r--webkit/tools/test_shell/test_shell_gtk.cc2
-rw-r--r--webkit/tools/test_shell/test_shell_mac.mm2
5 files changed, 5 insertions, 5 deletions
diff --git a/webkit/support/platform_support_android.cc b/webkit/support/platform_support_android.cc
index d99d99e..cce3557 100644
--- a/webkit/support/platform_support_android.cc
+++ b/webkit/support/platform_support_android.cc
@@ -53,7 +53,7 @@ void AfterInitialize(bool unit_test_mode) {
FilePath data_path(kDumpRenderTreeDir);
data_path = data_path.Append("DumpRenderTree.pak");
- ResourceBundle::InitSharedInstanceWithPakFile(data_path);
+ ResourceBundle::InitSharedInstanceWithPakPath(data_path);
// We enable file-over-http to bridge the file protocol to http protocol
// in here, which can
diff --git a/webkit/support/platform_support_linux.cc b/webkit/support/platform_support_linux.cc
index c696443..7734b11 100644
--- a/webkit/support/platform_support_linux.cc
+++ b/webkit/support/platform_support_linux.cc
@@ -29,7 +29,7 @@ void AfterInitialize(bool unit_test_mode) {
FilePath data_path;
PathService::Get(base::DIR_EXE, &data_path);
data_path = data_path.Append("DumpRenderTree.pak");
- ResourceBundle::InitSharedInstanceWithPakFile(data_path);
+ ResourceBundle::InitSharedInstanceWithPakPath(data_path);
}
void BeforeShutdown() {
diff --git a/webkit/support/platform_support_mac.mm b/webkit/support/platform_support_mac.mm
index f7d4e33..82d608b 100644
--- a/webkit/support/platform_support_mac.mm
+++ b/webkit/support/platform_support_mac.mm
@@ -108,7 +108,7 @@ void AfterInitialize(bool unit_test_mode) {
[base::mac::FrameworkBundle() pathForResource:@"DumpRenderTree"
ofType:@"pak"];
FilePath resources_pak_path([resource_path fileSystemRepresentation]);
- if (!g_resource_data_pack->Load(resources_pak_path)) {
+ if (!g_resource_data_pack->LoadFromPath(resources_pak_path)) {
LOG(FATAL) << "failed to load DumpRenderTree.pak";
}
diff --git a/webkit/tools/test_shell/test_shell_gtk.cc b/webkit/tools/test_shell/test_shell_gtk.cc
index a58d72f..82c3573 100644
--- a/webkit/tools/test_shell/test_shell_gtk.cc
+++ b/webkit/tools/test_shell/test_shell_gtk.cc
@@ -162,7 +162,7 @@ void TestShell::InitializeTestShell(bool layout_test_mode,
FilePath data_path;
PathService::Get(base::DIR_EXE, &data_path);
data_path = data_path.Append("test_shell.pak");
- ResourceBundle::InitSharedInstanceWithPakFile(data_path);
+ ResourceBundle::InitSharedInstanceWithPakPath(data_path);
FilePath resources_dir;
PathService::Get(base::DIR_SOURCE_ROOT, &resources_dir);
diff --git a/webkit/tools/test_shell/test_shell_mac.mm b/webkit/tools/test_shell/test_shell_mac.mm
index d9b6ac2..6ef97ea 100644
--- a/webkit/tools/test_shell/test_shell_mac.mm
+++ b/webkit/tools/test_shell/test_shell_mac.mm
@@ -217,7 +217,7 @@ void TestShell::InitializeTestShell(bool layout_test_mode,
[base::mac::FrameworkBundle() pathForResource:@"test_shell"
ofType:@"pak"];
FilePath resources_pak_path([resource_path fileSystemRepresentation]);
- if (!g_resource_data_pack->Load(resources_pak_path)) {
+ if (!g_resource_data_pack->LoadFromPath(resources_pak_path)) {
LOG(FATAL) << "failed to load test_shell.pak";
}