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

Side by Side Diff: content/browser/indexed_db/leveldb/leveldb_write_batch.cc

Issue 2867693004: Snapshot of all changes to get jumbo in blink and content.
Patch Set: Exclude certain files from jumbo because of a Windows problem Created 3 years, 3 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/leveldb/leveldb_write_batch.h" 5 #include "content/browser/indexed_db/leveldb/leveldb_write_batch.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/strings/string_piece.h" 8 #include "base/strings/string_piece.h"
9 #include "third_party/leveldatabase/src/include/leveldb/slice.h" 9 #include "third_party/leveldatabase/src/include/leveldb/slice.h"
10 #include "third_party/leveldatabase/src/include/leveldb/write_batch.h" 10 #include "third_party/leveldatabase/src/include/leveldb/write_batch.h"
11 11
12 namespace content { 12 namespace content {
13 13
14 std::unique_ptr<LevelDBWriteBatch> LevelDBWriteBatch::Create() { 14 std::unique_ptr<LevelDBWriteBatch> LevelDBWriteBatch::Create() {
15 return base::WrapUnique(new LevelDBWriteBatch); 15 return base::WrapUnique(new LevelDBWriteBatch);
16 } 16 }
17 17
18 LevelDBWriteBatch::LevelDBWriteBatch() 18 LevelDBWriteBatch::LevelDBWriteBatch()
19 : write_batch_(new leveldb::WriteBatch) {} 19 : write_batch_(new leveldb::WriteBatch) {}
20 20
21 LevelDBWriteBatch::~LevelDBWriteBatch() {} 21 LevelDBWriteBatch::~LevelDBWriteBatch() {}
22 22
23 static leveldb::Slice MakeSlice(const base::StringPiece& s) { 23 static leveldb::Slice MakeSliceFoo(const base::StringPiece& s) {
24 return leveldb::Slice(s.begin(), s.size()); 24 return leveldb::Slice(s.begin(), s.size());
25 } 25 }
26 26
27 void LevelDBWriteBatch::Put(const base::StringPiece& key, 27 void LevelDBWriteBatch::Put(const base::StringPiece& key,
28 const base::StringPiece& value) { 28 const base::StringPiece& value) {
29 write_batch_->Put(MakeSlice(key), MakeSlice(value)); 29 write_batch_->Put(MakeSliceFoo(key), MakeSliceFoo(value));
30 } 30 }
31 31
32 void LevelDBWriteBatch::Remove(const base::StringPiece& key) { 32 void LevelDBWriteBatch::Remove(const base::StringPiece& key) {
33 write_batch_->Delete(MakeSlice(key)); 33 write_batch_->Delete(MakeSliceFoo(key));
34 } 34 }
35 35
36 void LevelDBWriteBatch::Clear() { write_batch_->Clear(); } 36 void LevelDBWriteBatch::Clear() { write_batch_->Clear(); }
37 37
38 } // namespace content 38 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/indexed_db/leveldb/leveldb_database.cc ('k') | content/browser/keyboard_lock/keyboard_lock_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698