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

Unified Diff: mash/example/window_type_launcher/window_type_launcher.cc

Issue 2967943002: Update AuraInit to handle failed initialization (Closed)
Patch Set: Created 3 years, 5 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
Index: mash/example/window_type_launcher/window_type_launcher.cc
diff --git a/mash/example/window_type_launcher/window_type_launcher.cc b/mash/example/window_type_launcher/window_type_launcher.cc
index 021135e48a4d113bf8ab07c17f152418dcb5bf8c..fd4ab1b2b680a3d6046516f246ac5846f33458c4 100644
--- a/mash/example/window_type_launcher/window_type_launcher.cc
+++ b/mash/example/window_type_launcher/window_type_launcher.cc
@@ -453,9 +453,12 @@ void WindowTypeLauncher::RemoveWindow(views::Widget* window) {
}
void WindowTypeLauncher::OnStart() {
- aura_init_ = base::MakeUnique<views::AuraInit>(
- context()->connector(), context()->identity(), "views_mus_resources.pak",
- std::string(), nullptr, views::AuraInit::Mode::AURA_MUS);
+ aura_init_ = base::MakeUnique<views::AuraInit>();
+ if (!aura_init_->Init(context()->connector(), context()->identity(),
+ "views_mus_resources.pak", std::string(), nullptr,
+ views::AuraInit::Mode::AURA_MUS)) {
+ context()->QuitNow();
+ }
}
void WindowTypeLauncher::OnBindInterface(

Powered by Google App Engine
This is Rietveld 408576698