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

Unified Diff: mandoline/ui/desktop_ui/browser_window.cc

Issue 1455833005: Convert ConnectToApplication to take a params class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 1 month 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 | « mandoline/ui/desktop_ui/browser_manager.cc ('k') | mash/wm/window_manager_apptest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mandoline/ui/desktop_ui/browser_window.cc
diff --git a/mandoline/ui/desktop_ui/browser_window.cc b/mandoline/ui/desktop_ui/browser_window.cc
index c049cf27e930963ef809fa5b48fca756a086357f..9c6b051ae6b8258870691ee2ccd585b9edc1e97d 100644
--- a/mandoline/ui/desktop_ui/browser_window.cc
+++ b/mandoline/ui/desktop_ui/browser_window.cc
@@ -141,9 +141,7 @@ void BrowserWindow::Close() {
void BrowserWindow::ShowOmnibox() {
TRACE_EVENT0("desktop_ui", "BrowserWindow::ShowOmnibox");
if (!omnibox_.get()) {
- mojo::URLRequestPtr request(mojo::URLRequest::New());
- request->url = mojo::String::From("mojo:omnibox");
- omnibox_connection_ = app_->ConnectToApplication(request.Pass());
+ omnibox_connection_ = app_->ConnectToApplication("mojo:omnibox");
omnibox_connection_->AddService<ViewEmbedder>(this);
omnibox_connection_->ConnectToService(&omnibox_);
omnibox_connection_->SetRemoteServiceProviderConnectionErrorHandler(
@@ -242,10 +240,8 @@ void BrowserWindow::OnEmbed(mus::Window* root) {
if (!recorded_browser_startup_metrics &&
base::CommandLine::ForCurrentProcess()->HasSwitch(
tracing::kEnableStatsCollectionBindings)) {
- mojo::URLRequestPtr request(mojo::URLRequest::New());
- request->url = mojo::String::From("mojo:tracing");
tracing::StartupPerformanceDataCollectorPtr collector;
- app_->ConnectToService(request.Pass(), &collector);
+ app_->ConnectToService("mojo:tracing", &collector);
collector->SetBrowserWindowDisplayTicks(display_ticks.ToInternalValue());
collector->SetBrowserOpenTabsTimeDelta(open_tabs_delta.ToInternalValue());
collector->SetBrowserMessageLoopStartTicks(
« no previous file with comments | « mandoline/ui/desktop_ui/browser_manager.cc ('k') | mash/wm/window_manager_apptest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698