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

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

Issue 1074493002: IndexedDB: Added IDBObjectStore.getAll() implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Limiting response size to 10 MB 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
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 {
(...skipping 14 matching lines...) Expand all
25 } 25 }
26 26
27 IndexedDBKeyRange::IndexedDBKeyRange(const IndexedDBKeyRange& other) = default; 27 IndexedDBKeyRange::IndexedDBKeyRange(const IndexedDBKeyRange& other) = default;
28 IndexedDBKeyRange::~IndexedDBKeyRange() = default; 28 IndexedDBKeyRange::~IndexedDBKeyRange() = default;
29 IndexedDBKeyRange& IndexedDBKeyRange::operator=( 29 IndexedDBKeyRange& IndexedDBKeyRange::operator=(
30 const IndexedDBKeyRange& other) = default; 30 const IndexedDBKeyRange& other) = default;
31 31
32 bool IndexedDBKeyRange::IsOnlyKey() const { 32 bool IndexedDBKeyRange::IsOnlyKey() const {
33 if (lower_open_ || upper_open_) 33 if (lower_open_ || upper_open_)
34 return false; 34 return false;
35 if (IsEmpty())
36 return false;
35 37
36 return lower_.Equals(upper_); 38 return lower_.Equals(upper_);
37 } 39 }
38 40
41 bool IndexedDBKeyRange::IsEmpty() const {
42 return !lower_.IsValid() && !upper_.IsValid();
43 }
44
39 } // namespace content 45 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698