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

Side by Side Diff: mojo/shell/context.cc

Issue 701933004: Change mojo url to always use mojo:foo instead of mojo://foo (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Follow review Created 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "mojo/shell/context.h" 5 #include "mojo/shell/context.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 private: 63 private:
64 DISALLOW_COPY_AND_ASSIGN(Setup); 64 DISALLOW_COPY_AND_ASSIGN(Setup);
65 }; 65 };
66 66
67 static base::LazyInstance<Setup>::Leaky setup = LAZY_INSTANCE_INITIALIZER; 67 static base::LazyInstance<Setup>::Leaky setup = LAZY_INSTANCE_INITIALIZER;
68 68
69 void InitContentHandlers(DynamicApplicationLoader* loader, 69 void InitContentHandlers(DynamicApplicationLoader* loader,
70 base::CommandLine* command_line) { 70 base::CommandLine* command_line) {
71 // Default content handlers. 71 // Default content handlers.
72 loader->RegisterContentHandler("application/pdf", GURL("mojo://pdf_viewer/")); 72 loader->RegisterContentHandler("application/pdf", GURL("mojo:pdf_viewer"));
73 loader->RegisterContentHandler("image/png", GURL("mojo://png_viewer/")); 73 loader->RegisterContentHandler("image/png", GURL("mojo:png_viewer"));
74 loader->RegisterContentHandler("text/html", GURL("mojo://html_viewer/")); 74 loader->RegisterContentHandler("text/html", GURL("mojo:html_viewer"));
75 75
76 // Command-line-specified content handlers. 76 // Command-line-specified content handlers.
77 std::string handlers_spec = command_line->GetSwitchValueASCII( 77 std::string handlers_spec = command_line->GetSwitchValueASCII(
78 switches::kContentHandlers); 78 switches::kContentHandlers);
79 if (handlers_spec.empty()) 79 if (handlers_spec.empty())
80 return; 80 return;
81 81
82 std::vector<std::string> parts; 82 std::vector<std::string> parts;
83 base::SplitString(handlers_spec, ',', &parts); 83 base::SplitString(handlers_spec, ',', &parts);
84 if (parts.size() % 2 != 0) { 84 if (parts.size() % 2 != 0) {
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 ScopedMessagePipeHandle Context::ConnectToServiceByName( 262 ScopedMessagePipeHandle Context::ConnectToServiceByName(
263 const GURL& application_url, 263 const GURL& application_url,
264 const std::string& service_name) { 264 const std::string& service_name) {
265 app_urls_.insert(application_url); 265 app_urls_.insert(application_url);
266 return application_manager_.ConnectToServiceByName( 266 return application_manager_.ConnectToServiceByName(
267 application_url, service_name).Pass(); 267 application_url, service_name).Pass();
268 } 268 }
269 269
270 } // namespace shell 270 } // namespace shell
271 } // namespace mojo 271 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/services/window_manager/window_manager_api_unittest.cc ('k') | mojo/shell/desktop/mojo_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698