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

Side by Side Diff: third_party/WebKit/Source/platform/CrossThreadCopier.cpp

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. Created 4 years, 6 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 unified diff | Download patch
OLDNEW
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
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>
38 39
39 namespace blink { 40 namespace blink {
40 41
41 CrossThreadCopier<KURL>::Type CrossThreadCopier<KURL>::copy(const KURL& url) 42 CrossThreadCopier<KURL>::Type CrossThreadCopier<KURL>::copy(const KURL& url)
42 { 43 {
43 return url.copy(); 44 return url.copy();
44 } 45 }
45 46
46 CrossThreadCopier<String>::Type CrossThreadCopier<String>::copy(const String& st r) 47 CrossThreadCopier<String>::Type CrossThreadCopier<String>::copy(const String& st r)
47 { 48 {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 CrossThreadCopier<RefPtr<CopierRefCountedTest>>::Type 107 CrossThreadCopier<RefPtr<CopierRefCountedTest>>::Type
107 >::value), 108 >::value),
108 "RefPtr<RefCounted> test"); 109 "RefPtr<RefCounted> test");
109 110
110 static_assert((std::is_same< 111 static_assert((std::is_same<
111 int, 112 int,
112 CrossThreadCopier<CopierRefCountedTest*>::Type 113 CrossThreadCopier<CopierRefCountedTest*>::Type
113 >::value), 114 >::value),
114 "Raw pointer RefCounted test"); 115 "Raw pointer RefCounted test");
115 116
116 // Verify that PassOwnPtr gets passed through. 117 // Verify that std::unique_ptr gets passed through.
117 static_assert((std::is_same< 118 static_assert((std::is_same<
118 PassOwnPtr<float>, 119 std::unique_ptr<float>,
119 CrossThreadCopier<PassOwnPtr<float>>::Type 120 CrossThreadCopier<std::unique_ptr<float>>::Type
120 >::value), 121 >::value),
121 "PassOwnPtr test"); 122 "std::unique_ptr test");
122 123
123 } // namespace blink 124 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/CrossThreadCopier.h ('k') | third_party/WebKit/Source/platform/Crypto.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698