| Index: webkit/tools/test_shell/test_shell_gtk.cc
|
| diff --git a/webkit/tools/test_shell/test_shell_gtk.cc b/webkit/tools/test_shell/test_shell_gtk.cc
|
| index 972256e0e266c9ecef60d2cdd78b2d6ab942b140..f1087a881c2600b5f22aee7ed1c3b9a1c0ffc20d 100644
|
| --- a/webkit/tools/test_shell/test_shell_gtk.cc
|
| +++ b/webkit/tools/test_shell/test_shell_gtk.cc
|
| @@ -11,10 +11,12 @@
|
| #include <signal.h>
|
| #include <unistd.h>
|
|
|
| +#include "base/data_pack.h"
|
| #include "base/file_path.h"
|
| #include "base/file_util.h"
|
| #include "base/message_loop.h"
|
| #include "base/path_service.h"
|
| +#include "base/string_piece.h"
|
| #include "base/string_util.h"
|
| #include "net/base/mime_util.h"
|
| #include "net/base/net_util.h"
|
| @@ -616,6 +618,24 @@ void TestShell::ShowStartupDebuggingDialog() {
|
| gtk_widget_destroy(dialog);
|
| }
|
|
|
| +// static
|
| +StringPiece TestShell::NetResourceProvider(int key) {
|
| + static scoped_ptr<base::DataPack> resource_data_pack;
|
| +
|
| + if (!resource_data_pack.get()) {
|
| + resource_data_pack.reset(new base::DataPack);
|
| + FilePath data_path;
|
| + PathService::Get(base::DIR_EXE, &data_path);
|
| + data_path = data_path.Append("test_shell.pak");
|
| + bool success = resource_data_pack->Load(data_path);
|
| + CHECK(success) << "failed to load test_shell.pak";
|
| + }
|
| +
|
| + StringPiece res;
|
| + resource_data_pack->Get(key, &res);
|
| + return res;
|
| +}
|
| +
|
| //-----------------------------------------------------------------------------
|
|
|
| namespace webkit_glue {
|
|
|