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

Unified Diff: services/asset_bundle/main.cc

Issue 2011383002: Get rid of {Run,Terminate}MainApplication(), and more ApplicationDelegate conversion. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebased Created 4 years, 7 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/services/log/cpp/log_client.h ('k') | services/authenticating_url_loader_interceptor/main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/asset_bundle/main.cc
diff --git a/services/asset_bundle/main.cc b/services/asset_bundle/main.cc
index d6c8d63f5be3387e32cc353cb0a04a885c893967..7ea64f88d68eaeee924248d1a9043691285dc0f3 100644
--- a/services/asset_bundle/main.cc
+++ b/services/asset_bundle/main.cc
@@ -4,6 +4,7 @@
#include "base/macros.h"
#include "base/threading/sequenced_worker_pool.h"
+#include "mojo/environment/scoped_chromium_init.h"
#include "mojo/public/c/system/main.h"
#include "mojo/public/cpp/application/application_impl_base.h"
#include "mojo/public/cpp/application/run_application.h"
@@ -25,8 +26,9 @@ class AssetBundleApp : public ApplicationImplBase {
[this](const ConnectionContext& connection_context,
InterfaceRequest<AssetUnpacker> asset_unpacker_request) {
// Lazily initialize |sequenced_worker_pool_|. (We can't create it in
- // the constructor, since AtExitManager is only created in
- // mojo::RunMainApplication().)
+ // the constructor, since the message loop (which implies that there's
+ // a current SingleThreadTaskRunner) is only created in
+ // mojo::RunApplication().)
if (!sequenced_worker_pool_) {
// TODO(vtl): What's the "right" way to choose the maximum number of
// threads?
@@ -53,6 +55,7 @@ class AssetBundleApp : public ApplicationImplBase {
} // namespace mojo
MojoResult MojoMain(MojoHandle application_request) {
+ mojo::ScopedChromiumInit init;
mojo::asset_bundle::AssetBundleApp asset_bundle_app;
- return mojo::RunMainApplication(application_request, &asset_bundle_app);
+ return mojo::RunApplication(application_request, &asset_bundle_app);
}
« no previous file with comments | « mojo/services/log/cpp/log_client.h ('k') | services/authenticating_url_loader_interceptor/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698