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 IndexedDBBlobInfo::~IndexedDBBlobInfo() = default; | |
54 IndexedDBBlobInfo& IndexedDBBlobInfo::operator=( | |
55 const IndexedDBBlobInfo& other) = default; | |
cmumford
2015/02/17 16:34:50
space between methods.
Daniel Bratell
2015/02/18 13:55:45
Done.
| |
53 | 56 |
54 void IndexedDBBlobInfo::set_size(int64 size) { | 57 void IndexedDBBlobInfo::set_size(int64 size) { |
55 DCHECK_EQ(-1, size_); | 58 DCHECK_EQ(-1, size_); |
56 size_ = size; | 59 size_ = size; |
57 } | 60 } |
58 | 61 |
59 void IndexedDBBlobInfo::set_uuid(const std::string& uuid) { | 62 void IndexedDBBlobInfo::set_uuid(const std::string& uuid) { |
60 DCHECK(uuid_.empty()); | 63 DCHECK(uuid_.empty()); |
61 uuid_ = uuid; | 64 uuid_ = uuid; |
62 DCHECK(!uuid_.empty()); | 65 DCHECK(!uuid_.empty()); |
(...skipping 21 matching lines...) Expand all Loading... | |
84 mark_used_callback_ = mark_used_callback; | 87 mark_used_callback_ = mark_used_callback; |
85 } | 88 } |
86 | 89 |
87 void IndexedDBBlobInfo::set_release_callback( | 90 void IndexedDBBlobInfo::set_release_callback( |
88 const ReleaseCallback& release_callback) { | 91 const ReleaseCallback& release_callback) { |
89 DCHECK(release_callback_.is_null()); | 92 DCHECK(release_callback_.is_null()); |
90 release_callback_ = release_callback; | 93 release_callback_ = release_callback; |
91 } | 94 } |
92 | 95 |
93 } // namespace content | 96 } // namespace content |
OLD | NEW |