| Index: shell/android/main.cc
|
| diff --git a/shell/android/main.cc b/shell/android/main.cc
|
| index 05e62cea1c9a4864e69b1a952f0c0e08e27f8626..92d4bb3e5a3ff8f355a795612127eb00e22bc2cc 100644
|
| --- a/shell/android/main.cc
|
| +++ b/shell/android/main.cc
|
| @@ -32,6 +32,7 @@
|
| #include "shell/android/java_application_loader.h"
|
| #include "shell/android/native_viewport_application_loader.h"
|
| #include "shell/android/ui_application_loader_android.h"
|
| +#include "shell/android/url_response_disk_cache_delegate_impl.h"
|
| #include "shell/application_manager/application_loader.h"
|
| #include "shell/background_application_loader.h"
|
| #include "shell/command_line_util.h"
|
| @@ -95,6 +96,10 @@ struct InternalShellData {
|
|
|
| // Event signalling when the shell task runner has been initialized.
|
| scoped_ptr<base::WaitableEvent> shell_runner_ready;
|
| +
|
| + // Delegate for URLResponseDiskCache. Allows to access bundled application on
|
| + // cold start.
|
| + scoped_ptr<URLResponseDiskCacheDelegateImpl> url_response_disk_cache_delegate;
|
| };
|
|
|
| LazyInstance<InternalShellData> g_internal_data = LAZY_INSTANCE_INITIALIZER;
|
| @@ -147,7 +152,9 @@ void MojoShellRunner::Run() {
|
|
|
| Context* context = g_internal_data.Get().context.get();
|
| ConfigureAndroidServices(context);
|
| - CHECK(context->InitWithPaths(mojo_shell_child_path_));
|
| + CHECK(context->InitWithPaths(
|
| + mojo_shell_child_path_,
|
| + g_internal_data.Get().url_response_disk_cache_delegate.get()));
|
|
|
| RunCommandLineApps(context);
|
|
|
| @@ -219,6 +226,7 @@ void UploadCrashes(const base::FilePath& dumps_path) {
|
| static void Start(JNIEnv* env,
|
| jclass clazz,
|
| jobject application_context,
|
| + jobject j_asset_manager,
|
| jstring mojo_shell_child_path,
|
| jobjectArray jparameters,
|
| jstring j_local_apps_directory,
|
| @@ -284,6 +292,9 @@ static void Start(JNIEnv* env,
|
| base::android::ConvertJavaStringToUTF8(env, j_local_apps_directory)));
|
| g_internal_data.Get().context.reset(shell_context);
|
|
|
| + g_internal_data.Get().url_response_disk_cache_delegate.reset(
|
| + new URLResponseDiskCacheDelegateImpl(shell_context, j_asset_manager));
|
| +
|
| g_internal_data.Get().java_message_loop.reset(new base::MessageLoopForUI);
|
| base::MessageLoopForUI::current()->Start();
|
| tracer->DidCreateMessageLoop();
|
|
|