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

Side by Side Diff: shell/launcher_main.cc

Issue 988693005: Chromium roll (https://codereview.chromium.org/976353002) (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: fixed bad android build patch Created 5 years, 9 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 unified diff | Download patch
« no previous file with comments | « shell/application_manager/application_manager.h ('k') | shell/test/pingable_app.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/at_exit.h" 5 #include "base/at_exit.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/bind_helpers.h" 7 #include "base/bind_helpers.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 28 matching lines...) Expand all
39 base::FilePath(command_line.GetSwitchValuePath(kShellPath)))) { 39 base::FilePath(command_line.GetSwitchValuePath(kShellPath)))) {
40 // TODO(vtl): I guess this should be SLAVE, not NONE? 40 // TODO(vtl): I guess this should be SLAVE, not NONE?
41 embedder::InitIPCSupport(embedder::ProcessType::NONE, loop_.task_runner(), 41 embedder::InitIPCSupport(embedder::ProcessType::NONE, loop_.task_runner(),
42 this, loop_.task_runner(), 42 this, loop_.task_runner(),
43 embedder::ScopedPlatformHandle()); 43 embedder::ScopedPlatformHandle());
44 44
45 base::SplitStringAlongWhitespace(command_line.GetSwitchValueASCII(kAppArgs), 45 base::SplitStringAlongWhitespace(command_line.GetSwitchValueASCII(kAppArgs),
46 &app_args_); 46 &app_args_);
47 } 47 }
48 48
49 ~Launcher() { 49 ~Launcher() override {
50 // TODO(vtl): We need to destroy this before calling 50 // TODO(vtl): We need to destroy this before calling
51 // ShutdownIPCSupportOnIOThread(). This is all quite sketchy, and we really 51 // ShutdownIPCSupportOnIOThread(). This is all quite sketchy, and we really
52 // should convert all of this to running the application on the main thread, 52 // should convert all of this to running the application on the main thread,
53 // with a separate I/O thread (and managing the lifetime of everything more 53 // with a separate I/O thread (and managing the lifetime of everything more
54 // carefully). 54 // carefully).
55 connection_.reset(); 55 connection_.reset();
56 DCHECK(!application_request_.is_pending()); 56 DCHECK(!application_request_.is_pending());
57 57
58 embedder::ShutdownIPCSupportOnIOThread(); 58 embedder::ShutdownIPCSupportOnIOThread();
59 } 59 }
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 123
124 if (!launcher.Register()) { 124 if (!launcher.Register()) {
125 LOG(ERROR) << "Error registering " 125 LOG(ERROR) << "Error registering "
126 << command_line->GetSwitchValueASCII(mojo::shell::kAppURL); 126 << command_line->GetSwitchValueASCII(mojo::shell::kAppURL);
127 return 1; 127 return 1;
128 } 128 }
129 129
130 launcher.Run(); 130 launcher.Run();
131 return 0; 131 return 0;
132 } 132 }
OLDNEW
« no previous file with comments | « shell/application_manager/application_manager.h ('k') | shell/test/pingable_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698