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

Unified Diff: webkit/common/blob/blob_data.cc

Issue 524983002: Move fileapi-related files from webkit/common/ to storage/common/ and set up redirect headers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix presubmit Created 6 years, 3 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 | « webkit/common/blob/blob_data.h ('k') | webkit/common/blob/scoped_file.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/common/blob/blob_data.cc
diff --git a/webkit/common/blob/blob_data.cc b/webkit/common/blob/blob_data.cc
deleted file mode 100644
index 4718c74ecb483a5a1508c831551c3303ffc6501e..0000000000000000000000000000000000000000
--- a/webkit/common/blob/blob_data.cc
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "webkit/common/blob/blob_data.h"
-
-#include "base/logging.h"
-#include "base/strings/sys_string_conversions.h"
-#include "base/strings/utf_string_conversions.h"
-#include "base/time/time.h"
-
-namespace storage {
-
-BlobData::BlobData() {}
-BlobData::BlobData(const std::string& uuid)
- : uuid_(uuid) {
-}
-
-BlobData::~BlobData() {}
-
-void BlobData::AppendData(const char* data, size_t length) {
- DCHECK(length > 0);
- items_.push_back(Item());
- items_.back().SetToBytes(data, length);
-}
-
-void BlobData::AppendFile(const base::FilePath& file_path,
- uint64 offset, uint64 length,
- const base::Time& expected_modification_time) {
- DCHECK(length > 0);
- items_.push_back(Item());
- items_.back().SetToFilePathRange(file_path, offset, length,
- expected_modification_time);
-}
-
-void BlobData::AppendBlob(const std::string& uuid,
- uint64 offset, uint64 length) {
- DCHECK_GT(length, 0ul);
- items_.push_back(Item());
- items_.back().SetToBlobRange(uuid, offset, length);
-}
-
-void BlobData::AppendFileSystemFile(
- const GURL& url, uint64 offset,
- uint64 length,
- const base::Time& expected_modification_time) {
- DCHECK(length > 0);
- items_.push_back(Item());
- items_.back().SetToFileSystemUrlRange(url, offset, length,
- expected_modification_time);
-}
-
-int64 BlobData::GetMemoryUsage() const {
- int64 memory = 0;
- for (std::vector<Item>::const_iterator iter = items_.begin();
- iter != items_.end(); ++iter) {
- if (iter->type() == Item::TYPE_BYTES)
- memory += iter->length();
- }
- return memory;
-}
-
-} // namespace storage
« no previous file with comments | « webkit/common/blob/blob_data.h ('k') | webkit/common/blob/scoped_file.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698