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

Unified Diff: mojo/shell/fetcher/url_resolver.cc

Issue 1563413002: Move fetchers into mojo/shell/fetcher (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/shell/fetcher/url_resolver.h ('k') | mojo/shell/fetcher/url_resolver_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/fetcher/url_resolver.cc
diff --git a/mojo/fetcher/url_resolver.cc b/mojo/shell/fetcher/url_resolver.cc
similarity index 87%
rename from mojo/fetcher/url_resolver.cc
rename to mojo/shell/fetcher/url_resolver.cc
index 4663f5e5f85d4ec161c68c52061afaadeef9d708..499d9fdb03d2fd7c5b43eccff14c0c1657b697a4 100644
--- a/mojo/fetcher/url_resolver.cc
+++ b/mojo/shell/fetcher/url_resolver.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "mojo/fetcher/url_resolver.h"
+#include "mojo/shell/fetcher/url_resolver.h"
#include "base/base_paths.h"
#include "base/logging.h"
@@ -12,7 +12,7 @@
#include "url/url_util.h"
namespace mojo {
-namespace fetcher {
+namespace shell {
URLResolver::URLResolver(const GURL& mojo_base_url)
: mojo_base_url_(util::AddTrailingSlashIfNeeded(mojo_base_url)) {
@@ -29,7 +29,7 @@ GURL URLResolver::ResolveMojoURL(const GURL& mojo_url) const {
if (mojo_url.SchemeIs("mojo")) {
// It's still a mojo: URL, use the default mapping scheme.
std::string query;
- GURL base_url = shell::GetBaseURLAndQuery(mojo_url, &query);
+ GURL base_url = GetBaseURLAndQuery(mojo_url, &query);
const std::string host = base_url.host();
return mojo_base_url_.Resolve(host + "/" + host + ".mojo" + query);
} else if (mojo_url.SchemeIs("exe")) {
@@ -39,7 +39,7 @@ GURL URLResolver::ResolveMojoURL(const GURL& mojo_url) const {
std::string extension;
#endif
std::string query;
- GURL base_url = shell::GetBaseURLAndQuery(mojo_url, &query);
+ GURL base_url = GetBaseURLAndQuery(mojo_url, &query);
return mojo_base_url_.Resolve(base_url.host() + extension);
} else {
// The mapping has produced some sort of non-mojo: URL - file:, http:, etc.
@@ -47,5 +47,5 @@ GURL URLResolver::ResolveMojoURL(const GURL& mojo_url) const {
}
}
-} // namespace fetcher
+} // namespace shell
} // namespace mojo
« no previous file with comments | « mojo/shell/fetcher/url_resolver.h ('k') | mojo/shell/fetcher/url_resolver_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698