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

Side by Side Diff: shell/url_resolver.cc

Issue 1067173003: Remove mojo:: part of mojo::shell:: nested namespace in //shell. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 8 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 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 "shell/url_resolver.h" 5 #include "shell/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 "shell/application_manager/query_util.h" 10 #include "shell/application_manager/query_util.h"
11 #include "shell/filename_util.h" 11 #include "shell/filename_util.h"
12 #include "shell/switches.h" 12 #include "shell/switches.h"
13 #include "url/url_util.h" 13 #include "url/url_util.h"
14 14
15 namespace mojo {
16 namespace shell { 15 namespace shell {
17 16
18 URLResolver::URLResolver() { 17 URLResolver::URLResolver() {
19 // Needed to treat first component of mojo URLs as host, not path. 18 // Needed to treat first component of mojo URLs as host, not path.
20 url::AddStandardScheme("mojo"); 19 url::AddStandardScheme("mojo");
21 } 20 }
22 21
23 URLResolver::~URLResolver() { 22 URLResolver::~URLResolver() {
24 } 23 }
25 24
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 } else { 100 } else {
102 // It's still a mojo: URL, use the default mapping scheme. 101 // It's still a mojo: URL, use the default mapping scheme.
103 std::string query; 102 std::string query;
104 GURL base_url = GetBaseURLAndQuery(mojo_url, &query); 103 GURL base_url = GetBaseURLAndQuery(mojo_url, &query);
105 std::string lib = base_url.host() + ".mojo" + query; 104 std::string lib = base_url.host() + ".mojo" + query;
106 return mojo_base_url_.Resolve(lib); 105 return mojo_base_url_.Resolve(lib);
107 } 106 }
108 } 107 }
109 108
110 } // namespace shell 109 } // namespace shell
111 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698