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

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 1822213002: Changes to get mash browser_tests shutdown working correctly (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: order Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/test/base/mash_browser_tests_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_browser_main.cc
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index 0311f133cbd68659dfe366706452760be77c6805..61723fabe97a7bec9423c992cbc780a2d318ec0b 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -257,6 +257,11 @@
#include "components/webusb/webusb_detector.h"
#endif
+#if defined(MOJO_SHELL_CLIENT)
+#include "chrome/browser/lifetime/application_lifetime.h"
+#include "content/public/common/mojo_shell_connection.h"
+#endif
+
using content::BrowserThread;
namespace {
@@ -1138,6 +1143,13 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
}
void ChromeBrowserMainParts::PreMainMessageLoopRun() {
+#if defined(MOJO_SHELL_CLIENT)
+ if (content::MojoShellConnection::Get() &&
+ content::MojoShellConnection::Get()->UsingExternalShell()) {
+ content::MojoShellConnection::Get()->SetConnectionLostClosure(
+ base::Bind(&chrome::SessionEnding));
+ }
+#endif
TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreMainMessageLoopRun");
TRACK_SCOPED_REGION(
"Startup", "ChromeBrowserMainParts::PreMainMessageLoopRun");
« no previous file with comments | « no previous file | chrome/test/base/mash_browser_tests_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698