Remove BlobData::Create() in blink

As advised in [1], this CL removes unnecessary BlobData::Create() in
//third_party/blink/renderer/ and make it's constructors public, then
make the callers use std::make_unique<BlobData> instead of their
Create() factory function. Additionally this CL makes to use auto keyword
when creating a local variable by using std::make_unique<BlobData> because
it's clear the returned type is std::unique_ptr.

[1] https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/iJ1bawbxbWs/vEdfT5QtBgAJ

Bug: 939691
Change-Id: Id5800e816128f640f79e1c422ff0b98a57798e89
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1525786
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Gyuyoung Kim <gyuyoung@igalia.com>
Cr-Commit-Position: refs/heads/master@{#641155}
diff --git a/third_party/blink/renderer/core/clipboard/data_object_item.cc b/third_party/blink/renderer/core/clipboard/data_object_item.cc
index 64f74d6..8bc02b9 100644
--- a/third_party/blink/renderer/core/clipboard/data_object_item.cc
+++ b/third_party/blink/renderer/core/clipboard/data_object_item.cc
@@ -139,7 +139,7 @@
         mojom::ClipboardBuffer::kStandard);
     std::vector<unsigned char> png_data;
     if (gfx::PNGCodec::FastEncodeBGRASkBitmap(image, false, &png_data)) {
-      std::unique_ptr<BlobData> data = BlobData::Create();
+      auto data = std::make_unique<BlobData>();
       data->SetContentType(kMimeTypeImagePng);
       data->AppendBytes(png_data.data(), png_data.size());
       const uint64_t length = data->length();
diff --git a/third_party/blink/renderer/core/exported/web_blob.cc b/third_party/blink/renderer/core/exported/web_blob.cc
index 4f2f06f..c62ae5c 100644
--- a/third_party/blink/renderer/core/exported/web_blob.cc
+++ b/third_party/blink/renderer/core/exported/web_blob.cc
@@ -47,7 +47,7 @@
 }
 
 WebBlob WebBlob::CreateFromFile(const WebString& path, uint64_t size) {
-  std::unique_ptr<BlobData> blob_data = BlobData::Create();
+  auto blob_data = std::make_unique<BlobData>();
   blob_data->AppendFile(path, 0, size, InvalidFileTime());
   return Blob::Create(BlobDataHandle::Create(std::move(blob_data), size));
 }
diff --git a/third_party/blink/renderer/core/fetch/body.cc b/third_party/blink/renderer/core/fetch/body.cc
index dcda996..b40289f 100644
--- a/third_party/blink/renderer/core/fetch/body.cc
+++ b/third_party/blink/renderer/core/fetch/body.cc
@@ -206,7 +206,7 @@
       return ScriptPromise();
     }
   } else {
-    std::unique_ptr<BlobData> blob_data = BlobData::Create();
+    auto blob_data = std::make_unique<BlobData>();
     blob_data->SetContentType(MimeType());
     resolver->Resolve(
         Blob::Create(BlobDataHandle::Create(std::move(blob_data), 0)));
diff --git a/third_party/blink/renderer/core/fetch/body_stream_buffer_test.cc b/third_party/blink/renderer/core/fetch/body_stream_buffer_test.cc
index c06daa5..6f6fd9e 100644
--- a/third_party/blink/renderer/core/fetch/body_stream_buffer_test.cc
+++ b/third_party/blink/renderer/core/fetch/body_stream_buffer_test.cc
@@ -208,7 +208,7 @@
 
 TEST_F(BodyStreamBufferTest, DrainAsBlobDataHandle) {
   V8TestingScope scope;
-  std::unique_ptr<BlobData> data = BlobData::Create();
+  auto data = std::make_unique<BlobData>();
   data->AppendText("hello", false);
   auto size = data->length();
   scoped_refptr<BlobDataHandle> blob_data_handle =
diff --git a/third_party/blink/renderer/core/fetch/bytes_consumer_tee_test.cc b/third_party/blink/renderer/core/fetch/bytes_consumer_tee_test.cc
index df34021..eee1df3 100644
--- a/third_party/blink/renderer/core/fetch/bytes_consumer_tee_test.cc
+++ b/third_party/blink/renderer/core/fetch/bytes_consumer_tee_test.cc
@@ -351,7 +351,7 @@
 
 TEST_F(BytesConsumerTeeTest, BlobHandle) {
   scoped_refptr<BlobDataHandle> blob_data_handle =
-      BlobDataHandle::Create(BlobData::Create(), 12345);
+      BlobDataHandle::Create(std::make_unique<BlobData>(), 12345);
   BytesConsumer* src =
       MakeGarbageCollected<FakeBlobBytesConsumer>(blob_data_handle);
 
@@ -373,7 +373,7 @@
 
 TEST_F(BytesConsumerTeeTest, BlobHandleWithInvalidSize) {
   scoped_refptr<BlobDataHandle> blob_data_handle = BlobDataHandle::Create(
-      BlobData::Create(), std::numeric_limits<uint64_t>::max());
+      std::make_unique<BlobData>(), std::numeric_limits<uint64_t>::max());
   BytesConsumer* src =
       MakeGarbageCollected<FakeBlobBytesConsumer>(blob_data_handle);
 
diff --git a/third_party/blink/renderer/core/fetch/fetch_data_loader.cc b/third_party/blink/renderer/core/fetch/fetch_data_loader.cc
index 802fc6a..e144222 100644
--- a/third_party/blink/renderer/core/fetch/fetch_data_loader.cc
+++ b/third_party/blink/renderer/core/fetch/fetch_data_loader.cc
@@ -48,7 +48,7 @@
       if (blob_handle->GetType() != mime_type_) {
         // A new Blob is created to override the Blob's type.
         auto blob_size = blob_handle->size();
-        auto blob_data = BlobData::Create();
+        auto blob_data = std::make_unique<BlobData>();
         blob_data->SetContentType(mime_type_);
         blob_data->AppendBlob(std::move(blob_handle), 0, blob_size);
         client_->DidFetchDataLoadedBlobHandle(
@@ -59,7 +59,7 @@
       return;
     }
 
-    blob_data_ = BlobData::Create();
+    blob_data_ = std::make_unique<BlobData>();
     blob_data_->SetContentType(mime_type_);
     consumer_->SetClient(this);
     OnStateChange();
@@ -355,7 +355,7 @@
       if (disposition_type != "form-data" || name_.IsNull())
         return false;
       if (!filename_.IsNull()) {
-        blob_data_ = BlobData::Create();
+        blob_data_ = std::make_unique<BlobData>();
         const AtomicString& content_type =
             header_fields.Get(http_names::kContentType);
         blob_data_->SetContentType(content_type.IsNull() ? "text/plain"
diff --git a/third_party/blink/renderer/core/fetch/fetch_data_loader_test.cc b/third_party/blink/renderer/core/fetch/fetch_data_loader_test.cc
index a6354e5..f82ac7b 100644
--- a/third_party/blink/renderer/core/fetch/fetch_data_loader_test.cc
+++ b/third_party/blink/renderer/core/fetch/fetch_data_loader_test.cc
@@ -183,7 +183,7 @@
 
 TEST(FetchDataLoaderTest,
      LoadAsBlobViaDrainAsBlobDataHandleWithSameContentType) {
-  std::unique_ptr<BlobData> blob_data = BlobData::Create();
+  auto blob_data = std::make_unique<BlobData>();
   blob_data->AppendBytes(kQuickBrownFox,
                          kQuickBrownFoxLengthWithTerminatingNull);
   blob_data->SetContentType("text/test");
@@ -225,7 +225,7 @@
 
 TEST(FetchDataLoaderTest,
      LoadAsBlobViaDrainAsBlobDataHandleWithDifferentContentType) {
-  std::unique_ptr<BlobData> blob_data = BlobData::Create();
+  auto blob_data = std::make_unique<BlobData>();
   blob_data->AppendBytes(kQuickBrownFox,
                          kQuickBrownFoxLengthWithTerminatingNull);
   blob_data->SetContentType("text/different");
diff --git a/third_party/blink/renderer/core/fetch/form_data_bytes_consumer.cc b/third_party/blink/renderer/core/fetch/form_data_bytes_consumer.cc
index 2b2883d..7ede271 100644
--- a/third_party/blink/renderer/core/fetch/form_data_bytes_consumer.cc
+++ b/third_party/blink/renderer/core/fetch/form_data_bytes_consumer.cc
@@ -92,7 +92,7 @@
     Vector<char> data;
     form_data_->Flatten(data);
     form_data_ = nullptr;
-    std::unique_ptr<BlobData> blob_data = BlobData::Create();
+    auto blob_data = std::make_unique<BlobData>();
     blob_data->AppendBytes(data.data(), data.size());
     auto length = blob_data->length();
     state_ = PublicState::kClosed;
@@ -399,7 +399,7 @@
       return;
     }
 
-    std::unique_ptr<BlobData> blob_data = BlobData::Create();
+    auto blob_data = std::make_unique<BlobData>();
     for (const auto& element : form_data_->Elements()) {
       switch (element.type_) {
         case FormDataElement::kData:
diff --git a/third_party/blink/renderer/core/fetch/form_data_bytes_consumer_test.cc b/third_party/blink/renderer/core/fetch/form_data_bytes_consumer_test.cc
index 9f5f55a..48c99d9 100644
--- a/third_party/blink/renderer/core/fetch/form_data_bytes_consumer_test.cc
+++ b/third_party/blink/renderer/core/fetch/form_data_bytes_consumer_test.cc
@@ -74,7 +74,7 @@
 
   data->AppendData("foo", 3);
   data->AppendFileRange("/foo/bar/baz", 3, 4, 5);
-  std::unique_ptr<BlobData> blob_data = BlobData::Create();
+  auto blob_data = std::make_unique<BlobData>();
   blob_data->AppendText("hello", false);
   auto size = blob_data->length();
   scoped_refptr<BlobDataHandle> blob_data_handle =
diff --git a/third_party/blink/renderer/core/fileapi/blob.cc b/third_party/blink/renderer/core/fileapi/blob.cc
index aa868b2..513c4c9 100644
--- a/third_party/blink/renderer/core/fileapi/blob.cc
+++ b/third_party/blink/renderer/core/fileapi/blob.cc
@@ -93,7 +93,7 @@
   if (normalize_line_endings_to_native)
     UseCounter::Count(context, WebFeature::kFileAPINativeLineEndings);
 
-  std::unique_ptr<BlobData> blob_data = BlobData::Create();
+  auto blob_data = std::make_unique<BlobData>();
   blob_data->SetContentType(NormalizeType(options->type()));
 
   PopulateBlobData(blob_data.get(), blob_parts,
@@ -109,7 +109,7 @@
                    const String& content_type) {
   DCHECK(data);
 
-  std::unique_ptr<BlobData> blob_data = BlobData::Create();
+  auto blob_data = std::make_unique<BlobData>();
   blob_data->SetContentType(content_type);
   blob_data->AppendBytes(data, size);
   uint64_t blob_size = blob_data->length();
@@ -176,7 +176,7 @@
   ClampSliceOffsets(size, start, end);
 
   uint64_t length = end - start;
-  std::unique_ptr<BlobData> blob_data = BlobData::Create();
+  auto blob_data = std::make_unique<BlobData>();
   blob_data->SetContentType(NormalizeType(content_type));
   blob_data->AppendBlob(blob_data_handle_, start, length);
   return Blob::Create(BlobDataHandle::Create(std::move(blob_data), length));
diff --git a/third_party/blink/renderer/core/fileapi/file.cc b/third_party/blink/renderer/core/fileapi/file.cc
index db25563..3003a2a 100644
--- a/third_party/blink/renderer/core/fileapi/file.cc
+++ b/third_party/blink/renderer/core/fileapi/file.cc
@@ -72,7 +72,7 @@
     const String& path,
     File::ContentTypeLookupPolicy policy) {
   if (path.IsEmpty()) {
-    std::unique_ptr<BlobData> blob_data = BlobData::Create();
+    auto blob_data = std::make_unique<BlobData>();
     blob_data->SetContentType("application/octet-stream");
     return blob_data;
   }
@@ -96,7 +96,7 @@
     blob_data = BlobData::CreateForFileWithUnknownSize(
         metadata.platform_path, metadata.modification_time / kMsPerSecond);
   } else {
-    blob_data = BlobData::Create();
+    blob_data = std::make_unique<BlobData>();
     blob_data->AppendFile(metadata.platform_path, 0, metadata.length,
                           metadata.modification_time / kMsPerSecond);
   }
@@ -113,7 +113,7 @@
     blob_data = BlobData::CreateForFileSystemURLWithUnknownSize(
         file_system_url, metadata.modification_time / kMsPerSecond);
   } else {
-    blob_data = BlobData::Create();
+    blob_data = std::make_unique<BlobData>();
     blob_data->AppendFileSystemURL(file_system_url, 0, metadata.length,
                                    metadata.modification_time / kMsPerSecond);
   }
@@ -141,7 +141,7 @@
   if (normalize_line_endings_to_native)
     UseCounter::Count(context, WebFeature::kFileAPINativeLineEndings);
 
-  std::unique_ptr<BlobData> blob_data = BlobData::Create();
+  auto blob_data = std::make_unique<BlobData>();
   blob_data->SetContentType(NormalizeType(options->type()));
   PopulateBlobData(blob_data.get(), file_bits,
                    normalize_line_endings_to_native);
@@ -358,7 +358,7 @@
   ClampSliceOffsets(size, start, end);
 
   uint64_t length = end - start;
-  std::unique_ptr<BlobData> blob_data = BlobData::Create();
+  auto blob_data = std::make_unique<BlobData>();
   blob_data->SetContentType(NormalizeType(content_type));
   DCHECK(!path_.IsEmpty());
   blob_data->AppendFile(path_, start, length,
diff --git a/third_party/blink/renderer/core/xmlhttprequest/xml_http_request.cc b/third_party/blink/renderer/core/xmlhttprequest/xml_http_request.cc
index d2934fc..7c7ff2b 100644
--- a/third_party/blink/renderer/core/xmlhttprequest/xml_http_request.cc
+++ b/third_party/blink/renderer/core/xmlhttprequest/xml_http_request.cc
@@ -411,7 +411,7 @@
     return nullptr;
 
   if (!response_blob_) {
-    std::unique_ptr<BlobData> blob_data = BlobData::Create();
+    auto blob_data = std::make_unique<BlobData>();
     blob_data->SetContentType(FinalResponseMIMETypeWithFallback().LowerASCII());
     size_t size = 0;
     if (binary_response_builder_ && binary_response_builder_->size()) {
@@ -1968,7 +1968,7 @@
     String mime_type = FinalResponseMIMETypeWithFallback().LowerASCII();
     if (blob->GetType() != mime_type) {
       auto blob_size = blob->size();
-      auto blob_data = BlobData::Create();
+      auto blob_data = std::make_unique<BlobData>();
       blob_data->SetContentType(mime_type);
       blob_data->AppendBlob(std::move(blob), 0, blob_size);
       response_blob_ =
diff --git a/third_party/blink/renderer/modules/cache_storage/cache.cc b/third_party/blink/renderer/modules/cache_storage/cache.cc
index 314e12d..21a9ebe 100644
--- a/third_party/blink/renderer/modules/cache_storage/cache.cc
+++ b/third_party/blink/renderer/modules/cache_storage/cache.cc
@@ -441,7 +441,7 @@
     batch_operation->request = std::move(fetch_api_request_);
     batch_operation->response = std::move(fetch_api_response_);
 
-    std::unique_ptr<BlobData> blob_data = BlobData::Create();
+    auto blob_data = std::make_unique<BlobData>();
     blob_data->SetContentType(mime_type_);
     blob_data->AppendBytes(array_buffer->Data(), array_buffer->ByteLength());
     batch_operation->response->blob = BlobDataHandle::Create(
@@ -453,7 +453,7 @@
       if (cached_metadata) {
         const Vector<uint8_t>& serialized_data =
             cached_metadata->SerializedData();
-        std::unique_ptr<BlobData> side_data_blob_data = BlobData::Create();
+        auto side_data_blob_data = std::make_unique<BlobData>();
         side_data_blob_data->AppendBytes(serialized_data.data(),
                                          serialized_data.size());
 
diff --git a/third_party/blink/renderer/modules/filesystem/file_system_dispatcher.cc b/third_party/blink/renderer/modules/filesystem/file_system_dispatcher.cc
index 3901303..1ded9d9 100644
--- a/third_party/blink/renderer/modules/filesystem/file_system_dispatcher.cc
+++ b/third_party/blink/renderer/modules/filesystem/file_system_dispatcher.cc
@@ -577,7 +577,7 @@
     FileMetadata file_metadata = FileMetadata::From(file_info);
     file_metadata.platform_path = FilePathToWebString(platform_path);
 
-    std::unique_ptr<BlobData> blob_data = BlobData::Create();
+    auto blob_data = std::make_unique<BlobData>();
     blob_data->AppendFile(file_metadata.platform_path, 0, file_metadata.length,
                           InvalidFileTime());
     scoped_refptr<BlobDataHandle> snapshot_blob =
diff --git a/third_party/blink/renderer/modules/indexeddb/idb_value_wrapping.cc b/third_party/blink/renderer/modules/indexeddb/idb_value_wrapping.cc
index 5ab0aac..74b7c5a 100644
--- a/third_party/blink/renderer/modules/indexeddb/idb_value_wrapping.cc
+++ b/third_party/blink/renderer/modules/indexeddb/idb_value_wrapping.cc
@@ -143,7 +143,7 @@
 
   // TODO(pwnall): The MIME type should probably be an atomic string.
   String mime_type(kWrapMimeType);
-  std::unique_ptr<BlobData> wrapper_blob_data = BlobData::Create();
+  auto wrapper_blob_data = std::make_unique<BlobData>();
   wrapper_blob_data->SetContentType(String(kWrapMimeType));
   wrapper_blob_data->AppendBytes(wire_data_.data(), wire_data_size);
   scoped_refptr<BlobDataHandle> wrapper_handle =
diff --git a/third_party/blink/renderer/modules/mediarecorder/media_recorder.cc b/third_party/blink/renderer/modules/mediarecorder/media_recorder.cc
index 0fa418d..1e6d9d4 100644
--- a/third_party/blink/renderer/modules/mediarecorder/media_recorder.cc
+++ b/third_party/blink/renderer/modules/mediarecorder/media_recorder.cc
@@ -334,7 +334,7 @@
   }
 
   if (!blob_data_) {
-    blob_data_ = BlobData::Create();
+    blob_data_ = std::make_unique<BlobData>();
     blob_data_->SetContentType(mime_type_);
   }
   if (data)
diff --git a/third_party/blink/renderer/modules/presentation/presentation_connection.cc b/third_party/blink/renderer/modules/presentation/presentation_connection.cc
index f1570cc..f286ef7 100644
--- a/third_party/blink/renderer/modules/presentation/presentation_connection.cc
+++ b/third_party/blink/renderer/modules/presentation/presentation_connection.cc
@@ -552,7 +552,7 @@
 
   switch (binary_type_) {
     case kBinaryTypeBlob: {
-      std::unique_ptr<BlobData> blob_data = BlobData::Create();
+      auto blob_data = std::make_unique<BlobData>();
       blob_data->AppendBytes(data, length);
       Blob* blob =
           Blob::Create(BlobDataHandle::Create(std::move(blob_data), length));
diff --git a/third_party/blink/renderer/modules/push_messaging/push_message_data.cc b/third_party/blink/renderer/modules/push_messaging/push_message_data.cc
index b7609dc..ec7a9e5 100644
--- a/third_party/blink/renderer/modules/push_messaging/push_message_data.cc
+++ b/third_party/blink/renderer/modules/push_messaging/push_message_data.cc
@@ -63,7 +63,7 @@
 }
 
 Blob* PushMessageData::blob() const {
-  std::unique_ptr<BlobData> blob_data = BlobData::Create();
+  auto blob_data = std::make_unique<BlobData>();
   blob_data->AppendBytes(data_.data(), data_.size());
 
   // Note that the content type of the Blob object is deliberately not being
diff --git a/third_party/blink/renderer/modules/websockets/dom_websocket.cc b/third_party/blink/renderer/modules/websockets/dom_websocket.cc
index 26b90ef..3fcdd14 100644
--- a/third_party/blink/renderer/modules/websockets/dom_websocket.cc
+++ b/third_party/blink/renderer/modules/websockets/dom_websocket.cc
@@ -746,7 +746,7 @@
       size_t size = binary_data->size();
       scoped_refptr<RawData> raw_data = RawData::Create();
       binary_data->swap(*raw_data->MutableData());
-      std::unique_ptr<BlobData> blob_data = BlobData::Create();
+      auto blob_data = std::make_unique<BlobData>();
       blob_data->AppendData(std::move(raw_data));
       Blob* blob =
           Blob::Create(BlobDataHandle::Create(std::move(blob_data), size));
diff --git a/third_party/blink/renderer/platform/blob/blob_data.cc b/third_party/blink/renderer/platform/blob/blob_data.cc
index aac5023..8a1c9ff 100644
--- a/third_party/blink/renderer/platform/blob/blob_data.cc
+++ b/third_party/blink/renderer/platform/blob/blob_data.cc
@@ -105,11 +105,6 @@
 
 RawData::RawData() = default;
 
-std::unique_ptr<BlobData> BlobData::Create() {
-  return base::WrapUnique(
-      new BlobData(FileCompositionStatus::NO_UNKNOWN_SIZE_FILES));
-}
-
 std::unique_ptr<BlobData> BlobData::CreateForFileWithUnknownSize(
     const String& path) {
   std::unique_ptr<BlobData> data = base::WrapUnique(
diff --git a/third_party/blink/renderer/platform/blob/blob_data.h b/third_party/blink/renderer/platform/blob/blob_data.h
index 6caf1fb..7ec4f68 100644
--- a/third_party/blink/renderer/platform/blob/blob_data.h
+++ b/third_party/blink/renderer/platform/blob/blob_data.h
@@ -73,8 +73,14 @@
 
  public:
   static constexpr int64_t kToEndOfFile = -1;
+  enum class FileCompositionStatus {
+    SINGLE_UNKNOWN_SIZE_FILE,
+    NO_UNKNOWN_SIZE_FILES
+  };
 
-  static std::unique_ptr<BlobData> Create();
+  explicit BlobData(FileCompositionStatus composition =
+                        FileCompositionStatus::NO_UNKNOWN_SIZE_FILES)
+      : file_composition_(composition) {}
 
   // Calling append* on objects returned by createFor___WithUnknownSize will
   // check-fail. The caller can only have an unknown-length file if it is the
@@ -129,14 +135,6 @@
   }
 
  private:
-  enum class FileCompositionStatus {
-    SINGLE_UNKNOWN_SIZE_FILE,
-    NO_UNKNOWN_SIZE_FILES
-  };
-
-  explicit BlobData(FileCompositionStatus composition)
-      : file_composition_(composition) {}
-
   void AppendDataInternal(base::span<const char> data,
                           scoped_refptr<RawData> = nullptr);
 
diff --git a/third_party/blink/renderer/platform/blob/blob_data_test.cc b/third_party/blink/renderer/platform/blob/blob_data_test.cc
index 5cc7d137..2657150 100644
--- a/third_party/blink/renderer/platform/blob/blob_data_test.cc
+++ b/third_party/blink/renderer/platform/blob/blob_data_test.cc
@@ -118,7 +118,7 @@
 
     empty_blob_ = BlobDataHandle::Create();
 
-    std::unique_ptr<BlobData> test_data = BlobData::Create();
+    auto test_data = std::make_unique<BlobData>();
     test_data->AppendBytes(large_test_data_.data(), large_test_data_.size());
     test_blob_ =
         BlobDataHandle::Create(std::move(test_data), large_test_data_.size());
@@ -257,7 +257,7 @@
 TEST_F(BlobDataHandleTest, CreateFromEmptyData) {
   String kType = "content/type";
 
-  std::unique_ptr<BlobData> data = BlobData::Create();
+  auto data = std::make_unique<BlobData>();
   data->SetContentType(kType);
 
   TestCreateBlob(std::move(data), {});
@@ -282,7 +282,7 @@
 }
 
 TEST_F(BlobDataHandleTest, CreateFromEmptyElements) {
-  std::unique_ptr<BlobData> data = BlobData::Create();
+  auto data = std::make_unique<BlobData>();
   data->AppendBytes(small_test_data_.data(), 0);
   data->AppendBlob(empty_blob_, 0, 0);
   data->AppendFile("path", 0, 0, 0.0);
@@ -292,7 +292,7 @@
 }
 
 TEST_F(BlobDataHandleTest, CreateFromSmallBytes) {
-  std::unique_ptr<BlobData> data = BlobData::Create();
+  auto data = std::make_unique<BlobData>();
   data->AppendBytes(small_test_data_.data(), small_test_data_.size());
 
   Vector<ExpectedElement> expected_elements;
@@ -302,7 +302,7 @@
 }
 
 TEST_F(BlobDataHandleTest, CreateFromLargeBytes) {
-  std::unique_ptr<BlobData> data = BlobData::Create();
+  auto data = std::make_unique<BlobData>();
   data->AppendBytes(large_test_data_.data(), large_test_data_.size());
 
   Vector<ExpectedElement> expected_elements;
@@ -312,7 +312,7 @@
 }
 
 TEST_F(BlobDataHandleTest, CreateFromMergedBytes) {
-  std::unique_ptr<BlobData> data = BlobData::Create();
+  auto data = std::make_unique<BlobData>();
   data->AppendBytes(medium_test_data_.data(), medium_test_data_.size());
   data->AppendBytes(small_test_data_.data(), small_test_data_.size());
   EXPECT_EQ(1u, data->Elements().size());
@@ -328,7 +328,7 @@
 }
 
 TEST_F(BlobDataHandleTest, CreateFromMergedLargeAndSmallBytes) {
-  std::unique_ptr<BlobData> data = BlobData::Create();
+  auto data = std::make_unique<BlobData>();
   data->AppendBytes(large_test_data_.data(), large_test_data_.size());
   data->AppendBytes(small_test_data_.data(), small_test_data_.size());
   EXPECT_EQ(1u, data->Elements().size());
@@ -344,7 +344,7 @@
 }
 
 TEST_F(BlobDataHandleTest, CreateFromMergedSmallAndLargeBytes) {
-  std::unique_ptr<BlobData> data = BlobData::Create();
+  auto data = std::make_unique<BlobData>();
   data->AppendBytes(small_test_data_.data(), small_test_data_.size());
   data->AppendBytes(large_test_data_.data(), large_test_data_.size());
   EXPECT_EQ(1u, data->Elements().size());
@@ -363,7 +363,7 @@
   double timestamp1 = CurrentTime();
   double timestamp2 = timestamp1 + 1;
   KURL url(NullURL(), "http://example.com/");
-  std::unique_ptr<BlobData> data = BlobData::Create();
+  auto data = std::make_unique<BlobData>();
   data->AppendFile("path", 4, 32, timestamp1);
   data->AppendFileSystemURL(url, 15, 876, timestamp2);
 
@@ -398,7 +398,7 @@
 }
 
 TEST_F(BlobDataHandleTest, CreateFromBlob) {
-  std::unique_ptr<BlobData> data = BlobData::Create();
+  auto data = std::make_unique<BlobData>();
   data->AppendBlob(test_blob_, 13, 765);
 
   Vector<ExpectedElement> expected_elements;
@@ -408,7 +408,7 @@
 }
 
 TEST_F(BlobDataHandleTest, CreateFromBlobsAndBytes) {
-  std::unique_ptr<BlobData> data = BlobData::Create();
+  auto data = std::make_unique<BlobData>();
   data->AppendBlob(test_blob_, 10, 10);
   data->AppendBytes(medium_test_data_.data(), medium_test_data_.size());
   data->AppendBlob(test_blob_, 0, 0);
@@ -430,7 +430,7 @@
 }
 
 TEST_F(BlobDataHandleTest, CreateFromSmallBytesAfterLargeBytes) {
-  std::unique_ptr<BlobData> data = BlobData::Create();
+  auto data = std::make_unique<BlobData>();
   data->AppendBytes(large_test_data_.data(), large_test_data_.size());
   data->AppendBlob(test_blob_, 0, 10);
   data->AppendBytes(small_test_data_.data(), small_test_data_.size());
@@ -444,7 +444,7 @@
 }
 
 TEST_F(BlobDataHandleTest, CreateFromManyMergedBytes) {
-  std::unique_ptr<BlobData> data = BlobData::Create();
+  auto data = std::make_unique<BlobData>();
   Vector<uint8_t> merged_data;
   while (merged_data.size() <= DataElementBytes::kMaximumEmbeddedDataSize) {
     data->AppendBytes(medium_test_data_.data(), medium_test_data_.size());