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

Side by Side Diff: services/ui/launcher/launcher_app.cc

Issue 2014043002: Make TracingImpl take a Shell* and args, instead of an ApplicationImpl*. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "services/ui/launcher/launcher_app.h" 5 #include "services/ui/launcher/launcher_app.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/strings/string_split.h" 9 #include "base/strings/string_split.h"
10 #include "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
(...skipping 12 matching lines...) Expand all
23 23
24 void LauncherApp::Initialize(mojo::ApplicationImpl* app_impl) { 24 void LauncherApp::Initialize(mojo::ApplicationImpl* app_impl) {
25 app_impl_ = app_impl; 25 app_impl_ = app_impl;
26 26
27 auto command_line = base::CommandLine::ForCurrentProcess(); 27 auto command_line = base::CommandLine::ForCurrentProcess();
28 command_line->InitFromArgv(app_impl_->args()); 28 command_line->InitFromArgv(app_impl_->args());
29 logging::LoggingSettings settings; 29 logging::LoggingSettings settings;
30 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; 30 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG;
31 logging::InitLogging(settings); 31 logging::InitLogging(settings);
32 32
33 tracing_.Initialize(app_impl_); 33 tracing_.Initialize(app_impl_->shell(), &app_impl_->args());
34 TRACE_EVENT0("launcher", __func__); 34 TRACE_EVENT0("launcher", __func__);
35 35
36 InitCompositor(); 36 InitCompositor();
37 InitViewManager(); 37 InitViewManager();
38 InitViewAssociates(command_line->GetSwitchValueASCII("view_associate_urls")); 38 InitViewAssociates(command_line->GetSwitchValueASCII("view_associate_urls"));
39 39
40 for (size_t i = 0; i < command_line->GetArgs().size(); ++i) { 40 for (size_t i = 0; i < command_line->GetArgs().size(); ++i) {
41 Launch(command_line->GetArgs()[i]); 41 Launch(command_line->GetArgs()[i]);
42 } 42 }
43 } 43 }
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 LOG(ERROR) << "Exiting due to view manager connection error."; 130 LOG(ERROR) << "Exiting due to view manager connection error.";
131 app_impl_->Terminate(); 131 app_impl_->Terminate();
132 } 132 }
133 133
134 void LauncherApp::OnViewAssociateConnectionError() { 134 void LauncherApp::OnViewAssociateConnectionError() {
135 LOG(ERROR) << "Exiting due to view associate connection error."; 135 LOG(ERROR) << "Exiting due to view associate connection error.";
136 app_impl_->Terminate(); 136 app_impl_->Terminate();
137 }; 137 };
138 138
139 } // namespace launcher 139 } // namespace launcher
OLDNEW
« no previous file with comments | « services/ui/input_manager/input_manager_app.cc ('k') | services/ui/view_manager/view_manager_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698