| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef SecurityOriginStructTraits_h | 5 #ifndef SecurityOriginStructTraits_h |
| 6 #define SecurityOriginStructTraits_h | 6 #define SecurityOriginStructTraits_h |
| 7 | 7 |
| 8 #include "platform/weborigin/SecurityOrigin.h" | 8 #include "platform/weborigin/SecurityOrigin.h" |
| 9 #include "platform/wtf/text/WTFString.h" |
| 9 #include "url/mojo/origin.mojom-blink.h" | 10 #include "url/mojo/origin.mojom-blink.h" |
| 10 #include "wtf/text/WTFString.h" | |
| 11 | 11 |
| 12 namespace mojo { | 12 namespace mojo { |
| 13 | 13 |
| 14 template <> | 14 template <> |
| 15 struct StructTraits<url::mojom::blink::Origin::DataView, | 15 struct StructTraits<url::mojom::blink::Origin::DataView, |
| 16 RefPtr<::blink::SecurityOrigin>> { | 16 RefPtr<::blink::SecurityOrigin>> { |
| 17 static WTF::String scheme(const RefPtr<::blink::SecurityOrigin>& origin) { | 17 static WTF::String scheme(const RefPtr<::blink::SecurityOrigin>& origin) { |
| 18 return origin->protocol(); | 18 return origin->protocol(); |
| 19 } | 19 } |
| 20 static WTF::String host(const RefPtr<::blink::SecurityOrigin>& origin) { | 20 static WTF::String host(const RefPtr<::blink::SecurityOrigin>& origin) { |
| (...skipping 22 matching lines...) Expand all Loading... |
| 43 // the values provided to 'create' were invalid. | 43 // the values provided to 'create' were invalid. |
| 44 if (!data.unique() && (*out)->isUnique()) | 44 if (!data.unique() && (*out)->isUnique()) |
| 45 return false; | 45 return false; |
| 46 | 46 |
| 47 return true; | 47 return true; |
| 48 } | 48 } |
| 49 }; | 49 }; |
| 50 } | 50 } |
| 51 | 51 |
| 52 #endif // SecurityOriginStructTraits_h | 52 #endif // SecurityOriginStructTraits_h |
| OLD | NEW |