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

Unified Diff: shell/application_manager/query_util.h

Issue 972473003: Strip query string before applying url mapping. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 | « shell/application_manager/application_manager.cc ('k') | shell/application_manager/query_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: shell/application_manager/query_util.h
diff --git a/shell/application_manager/query_util.h b/shell/application_manager/query_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..fa66ff860fd53216bc64376477c8fd2b370c7890
--- /dev/null
+++ b/shell/application_manager/query_util.h
@@ -0,0 +1,24 @@
+// Copyright 2015 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 SHELL_APPLICATION_MANAGER_QUERY_UTIL_H_
+#define SHELL_APPLICATION_MANAGER_QUERY_UTIL_H_
+
+#include <utility>
+
+#include "url/gurl.h"
+
+namespace mojo {
+
+// Returns the |url| with the query string stripped.
+GURL StripQueryFromURL(const GURL& url);
DaveMoore 2015/03/04 14:57:07 Instead of having two methods here why not just G
qsr 2015/03/04 15:02:05 Mainly because I didn't want to have some nullptr
+
+// Extract the query string from an URL and returns the base URL (without the
+// query string), and the query string. If the url doesn't have a query string,
+// it returns the url itself and an empty string.
+std::pair<GURL, std::string> GetBaseURLAndQuery(const GURL& url);
+
+} // namespace mojo
+
+#endif // SHELL_APPLICATION_MANAGER_QUERY_UTIL_H_
« no previous file with comments | « shell/application_manager/application_manager.cc ('k') | shell/application_manager/query_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698