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

Side by Side Diff: mojo/runner/url_resolver.cc

Issue 1091513005: Separate mojo/shell into a runner and the application manager (shell) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 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
« no previous file with comments | « mojo/runner/url_resolver.h ('k') | mojo/runner/url_resolver_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/url_resolver.h" 5 #include "mojo/runner/url_resolver.h"
6 6
7 #include "base/base_paths.h" 7 #include "base/base_paths.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
11 #include "mojo/shell/application_manager/query_util.h" 11 #include "mojo/runner/filename_util.h"
12 #include "mojo/shell/filename_util.h" 12 #include "mojo/runner/switches.h"
13 #include "mojo/shell/switches.h" 13 #include "mojo/shell/query_util.h"
14 #include "url/url_util.h" 14 #include "url/url_util.h"
15 15
16 namespace mojo { 16 namespace mojo {
17 namespace shell { 17 namespace shell {
18 18
19 URLResolver::URLResolver() { 19 URLResolver::URLResolver() {
20 // Needed to treat first component of mojo URLs as host, not path. 20 // Needed to treat first component of mojo URLs as host, not path.
21 url::AddStandardScheme("mojo"); 21 url::AddStandardScheme("mojo");
22 } 22 }
23 23
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 // It's still a mojo: URL, use the default mapping scheme. 109 // It's still a mojo: URL, use the default mapping scheme.
110 std::string query; 110 std::string query;
111 GURL base_url = GetBaseURLAndQuery(mojo_url, &query); 111 GURL base_url = GetBaseURLAndQuery(mojo_url, &query);
112 std::string lib = base_url.host() + ".mojo" + query; 112 std::string lib = base_url.host() + ".mojo" + query;
113 return mojo_base_url_.Resolve(lib); 113 return mojo_base_url_.Resolve(lib);
114 } 114 }
115 } 115 }
116 116
117 } // namespace shell 117 } // namespace shell
118 } // namespace mojo 118 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/runner/url_resolver.h ('k') | mojo/runner/url_resolver_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698