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

Unified Diff: Source/platform/exported/WebThreadSafeData.cpp

Issue 1162773003: [Blob] Dependencies for blob storage testing (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 7 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 | « no previous file | public/platform/WebBlobData.h » ('j') | public/platform/WebBlobData.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/exported/WebThreadSafeData.cpp
diff --git a/Source/platform/exported/WebThreadSafeData.cpp b/Source/platform/exported/WebThreadSafeData.cpp
index 3341eaf423c73dd608fe7a3da9e5945c4aba7bc2..6e927bd20c1650c998b072fd95b5913b8f2aba14 100644
--- a/Source/platform/exported/WebThreadSafeData.cpp
+++ b/Source/platform/exported/WebThreadSafeData.cpp
@@ -45,6 +45,13 @@ void WebThreadSafeData::assign(const WebThreadSafeData& other)
m_private = other.m_private;
}
+void WebThreadSafeData::assign(char* data, size_t length)
+{
+ RefPtr<RawData> raw = RawData::create();
+ raw->mutableData()->appendRange(data, data + length);
jsbell 2015/06/02 19:30:55 could also just be: append(data, length)
dmurph 2015/06/02 20:17:41 Looks better, done.
+ m_private = WebPrivatePtr<RawData>(raw.release().leakRef());
jsbell 2015/06/02 19:30:55 m_private = static_cast<RawData*>( ... ) seems to
dmurph 2015/06/02 20:17:41 I'm confused, I don't see how this would work. I
+}
+
size_t WebThreadSafeData::size() const
{
if (m_private.isNull())
« no previous file with comments | « no previous file | public/platform/WebBlobData.h » ('j') | public/platform/WebBlobData.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698