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

Side by Side Diff: content/common/indexed_db/indexed_db_key_range.cc

Issue 1071683002: IndexedDB: Use C++11 in-class member initializers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review feedback Created 5 years, 8 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
« no previous file with comments | « content/common/indexed_db/indexed_db_key_range.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/common/indexed_db/indexed_db_key_range.h" 5 #include "content/common/indexed_db/indexed_db_key_range.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "third_party/WebKit/public/platform/WebIDBTypes.h" 8 #include "third_party/WebKit/public/platform/WebIDBTypes.h"
9 9
10 namespace content { 10 namespace content {
11 11
12 IndexedDBKeyRange::IndexedDBKeyRange() 12 IndexedDBKeyRange::IndexedDBKeyRange() = default;
13 : lower_(blink::WebIDBKeyTypeNull),
14 upper_(blink::WebIDBKeyTypeNull),
15 lower_open_(false),
16 upper_open_(false) {}
17 13
18 IndexedDBKeyRange::IndexedDBKeyRange(const IndexedDBKey& lower, 14 IndexedDBKeyRange::IndexedDBKeyRange(const IndexedDBKey& lower,
19 const IndexedDBKey& upper, 15 const IndexedDBKey& upper,
20 bool lower_open, 16 bool lower_open,
21 bool upper_open) 17 bool upper_open)
22 : lower_(lower), 18 : lower_(lower),
23 upper_(upper), 19 upper_(upper),
24 lower_open_(lower_open), 20 lower_open_(lower_open),
25 upper_open_(upper_open) {} 21 upper_open_(upper_open) {}
26 22
27 IndexedDBKeyRange::IndexedDBKeyRange(const IndexedDBKey& key) 23 IndexedDBKeyRange::IndexedDBKeyRange(const IndexedDBKey& key)
28 : lower_(key), upper_(key), lower_open_(false), upper_open_(false) {} 24 : lower_(key), upper_(key) {
25 }
29 26
30 IndexedDBKeyRange::IndexedDBKeyRange(const IndexedDBKeyRange& other) = default; 27 IndexedDBKeyRange::IndexedDBKeyRange(const IndexedDBKeyRange& other) = default;
31 IndexedDBKeyRange::~IndexedDBKeyRange() = default; 28 IndexedDBKeyRange::~IndexedDBKeyRange() = default;
32 IndexedDBKeyRange& IndexedDBKeyRange::operator=( 29 IndexedDBKeyRange& IndexedDBKeyRange::operator=(
33 const IndexedDBKeyRange& other) = default; 30 const IndexedDBKeyRange& other) = default;
34 31
35 bool IndexedDBKeyRange::IsOnlyKey() const { 32 bool IndexedDBKeyRange::IsOnlyKey() const {
36 if (lower_open_ || upper_open_) 33 if (lower_open_ || upper_open_)
37 return false; 34 return false;
38 35
39 return lower_.Equals(upper_); 36 return lower_.Equals(upper_);
40 } 37 }
41 38
42 } // namespace content 39 } // namespace content
OLDNEW
« no previous file with comments | « content/common/indexed_db/indexed_db_key_range.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698