| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/indexed_db/indexed_db_blob_info.h" | 5 #include "content/browser/indexed_db/indexed_db_blob_info.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "content/browser/indexed_db/indexed_db_leveldb_coding.h" | 9 #include "content/browser/indexed_db/indexed_db_leveldb_coding.h" |
| 10 | 10 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 file_path_(file_path), | 42 file_path_(file_path), |
| 43 key_(DatabaseMetaDataKey::kInvalidBlobKey) { | 43 key_(DatabaseMetaDataKey::kInvalidBlobKey) { |
| 44 } | 44 } |
| 45 | 45 |
| 46 IndexedDBBlobInfo::IndexedDBBlobInfo(int64 key, | 46 IndexedDBBlobInfo::IndexedDBBlobInfo(int64 key, |
| 47 const base::string16& type, | 47 const base::string16& type, |
| 48 const base::string16& file_name) | 48 const base::string16& file_name) |
| 49 : is_file_(true), type_(type), size_(-1), file_name_(file_name), key_(key) { | 49 : is_file_(true), type_(type), size_(-1), file_name_(file_name), key_(key) { |
| 50 } | 50 } |
| 51 | 51 |
| 52 IndexedDBBlobInfo::~IndexedDBBlobInfo() {} | 52 IndexedDBBlobInfo::IndexedDBBlobInfo(const IndexedDBBlobInfo& other) = default; |
| 53 |
| 54 IndexedDBBlobInfo::~IndexedDBBlobInfo() = default; |
| 55 |
| 56 IndexedDBBlobInfo& IndexedDBBlobInfo::operator=( |
| 57 const IndexedDBBlobInfo& other) = default; |
| 53 | 58 |
| 54 void IndexedDBBlobInfo::set_size(int64 size) { | 59 void IndexedDBBlobInfo::set_size(int64 size) { |
| 55 DCHECK_EQ(-1, size_); | 60 DCHECK_EQ(-1, size_); |
| 56 size_ = size; | 61 size_ = size; |
| 57 } | 62 } |
| 58 | 63 |
| 59 void IndexedDBBlobInfo::set_uuid(const std::string& uuid) { | 64 void IndexedDBBlobInfo::set_uuid(const std::string& uuid) { |
| 60 DCHECK(uuid_.empty()); | 65 DCHECK(uuid_.empty()); |
| 61 uuid_ = uuid; | 66 uuid_ = uuid; |
| 62 DCHECK(!uuid_.empty()); | 67 DCHECK(!uuid_.empty()); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 84 mark_used_callback_ = mark_used_callback; | 89 mark_used_callback_ = mark_used_callback; |
| 85 } | 90 } |
| 86 | 91 |
| 87 void IndexedDBBlobInfo::set_release_callback( | 92 void IndexedDBBlobInfo::set_release_callback( |
| 88 const ReleaseCallback& release_callback) { | 93 const ReleaseCallback& release_callback) { |
| 89 DCHECK(release_callback_.is_null()); | 94 DCHECK(release_callback_.is_null()); |
| 90 release_callback_ = release_callback; | 95 release_callback_ = release_callback; |
| 91 } | 96 } |
| 92 | 97 |
| 93 } // namespace content | 98 } // namespace content |
| OLD | NEW |