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

Side by Side Diff: content/browser/indexed_db/indexed_db_blob_info.cc

Issue 933823002: Avoid large inlined automatic methods in IndexedDB code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: One more CONTENT_EXPORT Created 5 years, 10 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 unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_blob_info.h ('k') | content/browser/indexed_db/indexed_db_metadata.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698