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

Unified Diff: mojo/fetcher/url_resolver.h

Issue 1342503003: Move fetching logic out of ApplicationManager, eliminate url mappings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 3 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/fetcher/update_fetcher.cc ('k') | mojo/fetcher/url_resolver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/fetcher/url_resolver.h
diff --git a/mojo/fetcher/url_resolver.h b/mojo/fetcher/url_resolver.h
new file mode 100644
index 0000000000000000000000000000000000000000..47a69faca19d46376abac78c265d84f0cf22c3f1
--- /dev/null
+++ b/mojo/fetcher/url_resolver.h
@@ -0,0 +1,38 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MOJO_FETCHER_URL_RESOLVER_H_
+#define MOJO_FETCHER_URL_RESOLVER_H_
+
+#include <map>
+#include <set>
+
+#include "base/basictypes.h"
+#include "base/command_line.h"
+#include "base/files/file_path.h"
+#include "url/gurl.h"
+
+namespace mojo {
+namespace fetcher {
+
+// Supports resolving "mojo:" URLs to a file location, with ".mojo" appended.
+class URLResolver {
+ public:
+ explicit URLResolver(const GURL& mojo_base_url);
+ ~URLResolver();
+
+ // Resolve the given "mojo:" URL to the URL that should be used to fetch the
+ // code for the corresponding Mojo App.
+ GURL ResolveMojoURL(const GURL& mojo_url) const;
+
+ private:
+ GURL mojo_base_url_;
+
+ DISALLOW_COPY_AND_ASSIGN(URLResolver);
+};
+
+} // namespace fetcher
+} // namespace mojo
+
+#endif // MOJO_FETCHER_URL_RESOLVER_H_
« no previous file with comments | « mojo/fetcher/update_fetcher.cc ('k') | mojo/fetcher/url_resolver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698