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

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

Issue 2119283002: Use container::back() and container::pop_back() for content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_cursor.h" 5 #include "content/browser/indexed_db/indexed_db_cursor.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 default: 160 default:
161 NOTREACHED(); 161 NOTREACHED();
162 } 162 }
163 size_estimate += cursor_->key().size_estimate(); 163 size_estimate += cursor_->key().size_estimate();
164 size_estimate += cursor_->primary_key().size_estimate(); 164 size_estimate += cursor_->primary_key().size_estimate();
165 165
166 if (size_estimate > max_size_estimate) 166 if (size_estimate > max_size_estimate)
167 break; 167 break;
168 } 168 }
169 169
170 if (!found_keys.size()) { 170 if (found_keys.empty()) {
171 callbacks->OnSuccess(nullptr); 171 callbacks->OnSuccess(nullptr);
172 return; 172 return;
173 } 173 }
174 174
175 callbacks->OnSuccessWithPrefetch( 175 callbacks->OnSuccessWithPrefetch(
176 found_keys, found_primary_keys, &found_values); 176 found_keys, found_primary_keys, &found_values);
177 } 177 }
178 178
179 leveldb::Status IndexedDBCursor::PrefetchReset(int used_prefetches, 179 leveldb::Status IndexedDBCursor::PrefetchReset(int used_prefetches,
180 int /* unused_prefetches */) { 180 int /* unused_prefetches */) {
(...skipping 17 matching lines...) Expand all
198 } 198 }
199 199
200 void IndexedDBCursor::Close() { 200 void IndexedDBCursor::Close() {
201 IDB_TRACE("IndexedDBCursor::Close"); 201 IDB_TRACE("IndexedDBCursor::Close");
202 closed_ = true; 202 closed_ = true;
203 cursor_.reset(); 203 cursor_.reset();
204 saved_cursor_.reset(); 204 saved_cursor_.reset();
205 } 205 }
206 206
207 } // namespace content 207 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_backing_store.cc ('k') | content/browser/indexed_db/indexed_db_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698