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

Unified Diff: mojo/runner/context.cc

Issue 1350023002: Revert of Extract some stuff into PackageManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months 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
« no previous file with comments | « mojo/runner/context.h ('k') | mojo/runner/native_runner_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/runner/context.cc
diff --git a/mojo/runner/context.cc b/mojo/runner/context.cc
index a1e59899e80d048d3e60bf35fe1d99fba794857f..fc312bfff7a30a0f5e119f73f94b6c85fd5df987 100644
--- a/mojo/runner/context.cc
+++ b/mojo/runner/context.cc
@@ -29,7 +29,7 @@
#include "mojo/common/tracing_impl.h"
#include "mojo/edk/embedder/embedder.h"
#include "mojo/edk/embedder/simple_platform_support.h"
-#include "mojo/package_manager/package_manager_impl.h"
+#include "mojo/fetcher/base_application_fetcher.h"
#include "mojo/runner/in_process_native_runner.h"
#include "mojo/runner/out_of_process_native_runner.h"
#include "mojo/runner/switches.h"
@@ -59,7 +59,7 @@
DISALLOW_COPY_AND_ASSIGN(Setup);
};
-void InitContentHandlers(package_manager::PackageManagerImpl* manager,
+void InitContentHandlers(shell::ApplicationManager* manager,
const base::CommandLine& command_line) {
// Default content handlers.
manager->RegisterContentHandler("application/pdf", GURL("mojo:pdf_viewer"));
@@ -162,7 +162,9 @@
} // namespace
Context::Context(const base::FilePath& shell_file_root)
- : shell_file_root_(shell_file_root), main_entry_time_(base::Time::Now()) {}
+ : application_manager_(new shell::ApplicationManager(make_scoped_ptr(
+ new fetcher::BaseApplicationFetcher(shell_file_root)))),
+ main_entry_time_(base::Time::Now()) {}
Context::~Context() {
DCHECK(!base::MessageLoop::current());
@@ -187,12 +189,6 @@
embedder::InitIPCSupport(
embedder::ProcessType::NONE, task_runners_->shell_runner(), this,
task_runners_->io_runner(), embedder::ScopedPlatformHandle());
-
- package_manager_ = new package_manager::PackageManagerImpl(shell_file_root_);
- InitContentHandlers(package_manager_, command_line);
-
- application_manager_.reset(
- new shell::ApplicationManager(make_scoped_ptr(package_manager_)));
scoped_ptr<shell::NativeRunnerFactory> runner_factory;
if (command_line.HasSwitch(switches::kEnableMultiprocess))
@@ -201,6 +197,8 @@
runner_factory.reset(new InProcessNativeRunnerFactory(this));
application_manager_->set_blocking_pool(task_runners_->blocking_pool());
application_manager_->set_native_runner_factory(runner_factory.Pass());
+
+ InitContentHandlers(application_manager_.get(), command_line);
ServiceProviderPtr service_provider_ptr;
ServiceProviderPtr tracing_service_provider_ptr;
« no previous file with comments | « mojo/runner/context.h ('k') | mojo/runner/native_runner_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698