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

Unified Diff: content/browser/leveldb_wrapper_impl.h

Issue 2201763002: Switch on use_new_wrapper_types mode for content/common. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments from Lei and Michael Created 4 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/leveldb_wrapper_impl.h
diff --git a/content/browser/leveldb_wrapper_impl.h b/content/browser/leveldb_wrapper_impl.h
index d224662ec893b71846774a57f70ad0a515da8272..4f9fb9f2a0ca0995eb13a29bc5e5f1d4bc3756d6 100644
--- a/content/browser/leveldb_wrapper_impl.h
+++ b/content/browser/leveldb_wrapper_impl.h
@@ -12,6 +12,7 @@
#include "base/callback.h"
#include "base/macros.h"
+#include "base/optional.h"
#include "base/time/time.h"
#include "content/common/leveldb_wrapper.mojom.h"
#include "mojo/public/cpp/bindings/binding_set.h"
@@ -52,7 +53,8 @@ class LevelDBWrapperImpl : public mojom::LevelDBWrapper {
static void EnableAggressiveCommitDelay();
private:
- using ValueMap = std::map<mojo::Array<uint8_t>, mojo::Array<uint8_t>>;
+ using ValueMap =
+ std::map<std::vector<uint8_t>, base::Optional<std::vector<uint8_t>>>;
// Used to rate limit commits.
class RateLimiter {
@@ -87,17 +89,18 @@ class LevelDBWrapperImpl : public mojom::LevelDBWrapper {
};
// LevelDBWrapperImpl:
- void Put(mojo::Array<uint8_t> key,
- mojo::Array<uint8_t> value,
- const mojo::String& source,
+ void Put(const std::vector<uint8_t>& key,
+ const std::vector<uint8_t>& value,
+ const std::string& source,
const PutCallback& callback) override;
- void Delete(mojo::Array<uint8_t> key,
- const mojo::String& source,
+ void Delete(const std::vector<uint8_t>& key,
+ const std::string& source,
const DeleteCallback& callback) override;
- void DeleteAll(const mojo::String& source,
+ void DeleteAll(const std::string& source,
const DeleteAllCallback& callback) override;
- void Get(mojo::Array<uint8_t> key, const GetCallback& callback) override;
- void GetAll(const mojo::String& source,
+ void Get(const std::vector<uint8_t>& key,
+ const GetCallback& callback) override;
+ void GetAll(const std::string& source,
const GetAllCallback& callback) override;
void OnConnectionError();

Powered by Google App Engine
This is Rietveld 408576698