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

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: Added build() method Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | public/platform/WebBlobData.h » ('j') | no next file with comments »
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..cafe6c1b97fff6838068c22e064d86aede1cc74e 100644
--- a/Source/platform/exported/WebThreadSafeData.cpp
+++ b/Source/platform/exported/WebThreadSafeData.cpp
@@ -35,6 +35,12 @@
namespace blink {
+WebThreadSafeData::WebThreadSafeData(const char* data, size_t length)
+{
+ m_private = RawData::create().leakRef();
+ m_private->mutableData()->append(data, length);
+}
+
void WebThreadSafeData::reset()
{
m_private.reset();
@@ -64,6 +70,17 @@ WebThreadSafeData::WebThreadSafeData(const PassRefPtr<RawData>& data)
{
}
+WebThreadSafeData::WebThreadSafeData(const WebThreadSafeData& other)
+{
+ m_private = other.m_private;
+}
+
+WebThreadSafeData& WebThreadSafeData::operator=(const WebThreadSafeData& other)
+{
+ m_private = other.m_private;
+ return *this;
+}
+
WebThreadSafeData& WebThreadSafeData::operator=(const PassRefPtr<RawData>& data)
{
m_private = data;
« no previous file with comments | « no previous file | public/platform/WebBlobData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698