OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 17 matching lines...) Expand all Loading... |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #include "platform/CrossThreadCopier.h" | 31 #include "platform/CrossThreadCopier.h" |
32 | 32 |
33 #include "platform/network/ResourceError.h" | 33 #include "platform/network/ResourceError.h" |
34 #include "platform/network/ResourceRequest.h" | 34 #include "platform/network/ResourceRequest.h" |
35 #include "platform/network/ResourceResponse.h" | 35 #include "platform/network/ResourceResponse.h" |
36 #include "platform/weborigin/KURL.h" | 36 #include "platform/weborigin/KURL.h" |
37 #include "wtf/text/WTFString.h" | 37 #include "wtf/text/WTFString.h" |
38 #include <memory> | |
39 | 38 |
40 namespace blink { | 39 namespace blink { |
41 | 40 |
42 CrossThreadCopier<KURL>::Type CrossThreadCopier<KURL>::copy(const KURL& url) | 41 CrossThreadCopier<KURL>::Type CrossThreadCopier<KURL>::copy(const KURL& url) |
43 { | 42 { |
44 return url.copy(); | 43 return url.copy(); |
45 } | 44 } |
46 | 45 |
47 CrossThreadCopier<String>::Type CrossThreadCopier<String>::copy(const String& st
r) | 46 CrossThreadCopier<String>::Type CrossThreadCopier<String>::copy(const String& st
r) |
48 { | 47 { |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 CrossThreadCopier<RefPtr<CopierRefCountedTest>>::Type | 106 CrossThreadCopier<RefPtr<CopierRefCountedTest>>::Type |
108 >::value), | 107 >::value), |
109 "RefPtr<RefCounted> test"); | 108 "RefPtr<RefCounted> test"); |
110 | 109 |
111 static_assert((std::is_same< | 110 static_assert((std::is_same< |
112 int, | 111 int, |
113 CrossThreadCopier<CopierRefCountedTest*>::Type | 112 CrossThreadCopier<CopierRefCountedTest*>::Type |
114 >::value), | 113 >::value), |
115 "Raw pointer RefCounted test"); | 114 "Raw pointer RefCounted test"); |
116 | 115 |
117 // Verify that std::unique_ptr gets passed through. | 116 // Verify that PassOwnPtr gets passed through. |
118 static_assert((std::is_same< | 117 static_assert((std::is_same< |
119 std::unique_ptr<float>, | 118 PassOwnPtr<float>, |
120 CrossThreadCopier<std::unique_ptr<float>>::Type | 119 CrossThreadCopier<PassOwnPtr<float>>::Type |
121 >::value), | 120 >::value), |
122 "std::unique_ptr test"); | 121 "PassOwnPtr test"); |
123 | 122 |
124 } // namespace blink | 123 } // namespace blink |
OLD | NEW |