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

Unified Diff: mash/task_viewer/task_viewer.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/task_viewer/task_viewer.cc
diff --git a/mash/task_viewer/task_viewer.cc b/mash/task_viewer/task_viewer.cc
index cdc03e76ff8397c3f8675a3e1c0c263180475b1c..3ba471f012c2ab50b06e8dca9dcee46cc5596c14 100644
--- a/mash/task_viewer/task_viewer.cc
+++ b/mash/task_viewer/task_viewer.cc
@@ -294,9 +294,12 @@ void TaskViewer::RemoveWindow(views::Widget* widget) {
}
void TaskViewer::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 TaskViewer::OnBindInterface(
« no previous file with comments | « mash/simple_wm/simple_wm.cc ('k') | ui/views/mus/aura_init.h » ('j') | ui/views/mus/aura_init.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698