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

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

Issue 475063004: IndexedDB + Coding Style: re-order enums/typedefs/... to match guide (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased after r291485 Created 6 years, 4 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 | Annotate | Revision Log
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
11 namespace content { 11 namespace content {
12 12
13 IndexedDBBlobInfo::IndexedDBBlobInfo() 13 IndexedDBBlobInfo::IndexedDBBlobInfo()
14 : is_file_(false), size_(-1), key_(DatabaseMetaDataKey::kInvalidBlobKey) { 14 : is_file_(false), size_(-1), key_(DatabaseMetaDataKey::kInvalidBlobKey) {
15 } 15 }
16 16
17 IndexedDBBlobInfo::~IndexedDBBlobInfo() {}
18
19 IndexedDBBlobInfo::IndexedDBBlobInfo(const std::string& uuid, 17 IndexedDBBlobInfo::IndexedDBBlobInfo(const std::string& uuid,
20 const base::string16& type, 18 const base::string16& type,
21 int64 size) 19 int64 size)
22 : is_file_(false), 20 : is_file_(false),
23 uuid_(uuid), 21 uuid_(uuid),
24 type_(type), 22 type_(type),
25 size_(size), 23 size_(size),
26 key_(DatabaseMetaDataKey::kInvalidBlobKey) { 24 key_(DatabaseMetaDataKey::kInvalidBlobKey) {
27 } 25 }
28 26
(...skipping 15 matching lines...) Expand all
44 file_path_(file_path), 42 file_path_(file_path),
45 key_(DatabaseMetaDataKey::kInvalidBlobKey) { 43 key_(DatabaseMetaDataKey::kInvalidBlobKey) {
46 } 44 }
47 45
48 IndexedDBBlobInfo::IndexedDBBlobInfo(int64 key, 46 IndexedDBBlobInfo::IndexedDBBlobInfo(int64 key,
49 const base::string16& type, 47 const base::string16& type,
50 const base::string16& file_name) 48 const base::string16& file_name)
51 : 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) {
52 } 50 }
53 51
52 IndexedDBBlobInfo::~IndexedDBBlobInfo() {}
53
54 void IndexedDBBlobInfo::set_size(int64 size) { 54 void IndexedDBBlobInfo::set_size(int64 size) {
55 DCHECK_EQ(-1, size_); 55 DCHECK_EQ(-1, size_);
56 size_ = size; 56 size_ = size;
57 } 57 }
58 58
59 void IndexedDBBlobInfo::set_uuid(const std::string& uuid) { 59 void IndexedDBBlobInfo::set_uuid(const std::string& uuid) {
60 DCHECK(uuid_.empty()); 60 DCHECK(uuid_.empty());
61 uuid_ = uuid; 61 uuid_ = uuid;
62 DCHECK(!uuid_.empty()); 62 DCHECK(!uuid_.empty());
63 } 63 }
(...skipping 20 matching lines...) Expand all
84 mark_used_callback_ = mark_used_callback; 84 mark_used_callback_ = mark_used_callback;
85 } 85 }
86 86
87 void IndexedDBBlobInfo::set_release_callback( 87 void IndexedDBBlobInfo::set_release_callback(
88 const ReleaseCallback& release_callback) { 88 const ReleaseCallback& release_callback) {
89 DCHECK(release_callback_.is_null()); 89 DCHECK(release_callback_.is_null());
90 release_callback_ = release_callback; 90 release_callback_ = release_callback;
91 } 91 }
92 92
93 } // namespace content 93 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_blob_info.h ('k') | content/browser/indexed_db/indexed_db_context_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698