diff options
author | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-20 21:22:37 +0000 |
---|---|---|
committer | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-20 21:22:37 +0000 |
commit | 559fd2cc6db35d5dd473849836e5b31396936a73 (patch) | |
tree | e0cde62d5b6f120f64e1861299f8ae857278190c /webkit/tools/test_shell/test_shell_main.cc | |
parent | 2306bbd5843b30f4e78a9342b60d580dce083794 (diff) | |
download | chromium_src-559fd2cc6db35d5dd473849836e5b31396936a73.zip chromium_src-559fd2cc6db35d5dd473849836e5b31396936a73.tar.gz chromium_src-559fd2cc6db35d5dd473849836e5b31396936a73.tar.bz2 |
generate test_shell.pak and hook up loading net resources from
test_shell.pak. Move the net resource loading into the platform
specific files (still a stub on osx).
Review URL: http://codereview.chromium.org/18186
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8321 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/test_shell/test_shell_main.cc')
-rw-r--r-- | webkit/tools/test_shell/test_shell_main.cc | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/webkit/tools/test_shell/test_shell_main.cc b/webkit/tools/test_shell/test_shell_main.cc index f3a051d..d24c42d 100644 --- a/webkit/tools/test_shell/test_shell_main.cc +++ b/webkit/tools/test_shell/test_shell_main.cc @@ -32,7 +32,6 @@ #include "base/process_util.h" #include "base/rand_util.h" #include "base/stats_table.h" -#include "base/string_piece.h" #include "base/string_util.h" #include "base/sys_info.h" #include "base/trace_event.h" @@ -60,19 +59,6 @@ static int kStatsFileThreads = 20; static int kStatsFileCounters = 200; #if defined(OS_WIN) -StringPiece GetRawDataResource(HMODULE module, int resource_id) { - void* data_ptr; - size_t data_size; - return base::GetDataResourceFromModule(module, resource_id, &data_ptr, - &data_size) ? - StringPiece(static_cast<char*>(data_ptr), data_size) : StringPiece(); -} - -// This is called indirectly by the network layer to access resources. -StringPiece NetResourceProvider(int key) { - return GetRawDataResource(::GetModuleHandle(NULL), key); -} - // This test approximates whether you have the Windows XP theme selected by // inspecting a couple of metrics. It does not catch all cases, but it does // pick up on classic vs xp, and normal vs large fonts. Something it misses @@ -224,10 +210,10 @@ int main(int argc, char* argv[]) { // Load ICU data tables icu_util::Initialize(); -#if defined(OS_WIN) // Config the network module so it has access to a limited set of resources. - net::NetModule::SetResourceProvider(NetResourceProvider); + net::NetModule::SetResourceProvider(TestShell::NetResourceProvider); +#if defined(OS_WIN) INITCOMMONCONTROLSEX InitCtrlEx; InitCtrlEx.dwSize = sizeof(INITCOMMONCONTROLSEX); |