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

Unified Diff: mojo/common/url_type_converters.h

Issue 975083002: mojo/common: Decouple GURL dependency (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Landing 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 | « mojo/common/common_type_converters_unittest.cc ('k') | mojo/common/url_type_converters.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/common/url_type_converters.h
diff --git a/mojo/common/url_type_converters.h b/mojo/common/url_type_converters.h
new file mode 100644
index 0000000000000000000000000000000000000000..04390830795ef71c2b1bf5b25940a5604f7cd33f
--- /dev/null
+++ b/mojo/common/url_type_converters.h
@@ -0,0 +1,27 @@
+// 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 MOJO_COMMON_URL_TYPE_CONVERTERS_H_
+#define MOJO_COMMON_URL_TYPE_CONVERTERS_H_
+
+#include "third_party/mojo/src/mojo/public/cpp/bindings/string.h"
+#include "third_party/mojo/src/mojo/public/cpp/bindings/type_converter.h"
+
+class GURL;
+
+namespace mojo {
+
+template <>
+struct TypeConverter<String, GURL> {
+ static String Convert(const GURL& input);
+};
+
+template <>
+struct TypeConverter<GURL, String> {
+ static GURL Convert(const String& input);
+};
+
+} // namespace mojo
+
+#endif // MOJO_COMMON_URL_TYPE_CONVERTERS_H_
« no previous file with comments | « mojo/common/common_type_converters_unittest.cc ('k') | mojo/common/url_type_converters.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698