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

Unified Diff: extensions/browser/value_store/lazy_leveldb.h

Issue 1909773002: Convert //extensions/browser from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/browser/user_script_loader.cc ('k') | extensions/browser/value_store/lazy_leveldb.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/value_store/lazy_leveldb.h
diff --git a/extensions/browser/value_store/lazy_leveldb.h b/extensions/browser/value_store/lazy_leveldb.h
index 4fb93a63d71a43d80d63a2cb44e33ba49b33b526..551a6ea23fd9e4b2635d0eb3498d8e057e7b28cf 100644
--- a/extensions/browser/value_store/lazy_leveldb.h
+++ b/extensions/browser/value_store/lazy_leveldb.h
@@ -5,11 +5,11 @@
#ifndef EXTENSIONS_BROWSER_VALUE_STORE_LAZY_LEVELDB_H_
#define EXTENSIONS_BROWSER_VALUE_STORE_LAZY_LEVELDB_H_
+#include <memory>
#include <string>
#include "base/files/file_path.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/metrics/histogram_base.h"
#include "extensions/browser/value_store/value_store.h"
#include "third_party/leveldatabase/src/include/leveldb/db.h"
@@ -26,8 +26,9 @@ class LazyLevelDb {
public:
// Creates a new database iterator. This iterator *must* be deleted before
// this database is closed.
- ValueStore::Status CreateIterator(const leveldb::ReadOptions& read_options,
- scoped_ptr<leveldb::Iterator>* iterator);
+ ValueStore::Status CreateIterator(
+ const leveldb::ReadOptions& read_options,
+ std::unique_ptr<leveldb::Iterator>* iterator);
// Converts a leveldb::Status to a ValueStore::Status. Will also sanitize path
// to eliminate user data path.
@@ -53,7 +54,7 @@ class LazyLevelDb {
// be returned and value will be unchanged. Caller must ensure the database is
// open before calling this method.
ValueStore::Status Read(const std::string& key,
- scoped_ptr<base::Value>* value);
+ std::unique_ptr<base::Value>* value);
// Opens the underlying database if not yet open. If the open fails due to
// corruption will attempt to repair the database. Failing that, will attempt
@@ -75,7 +76,7 @@ class LazyLevelDb {
ValueStore::BackingStoreRestoreStatus restore_status) const;
// The leveldb to which this class reads/writes.
- scoped_ptr<leveldb::DB> db_;
+ std::unique_ptr<leveldb::DB> db_;
// The path to the underlying leveldb.
const base::FilePath db_path_;
// The options to be used when this database is lazily opened.
« no previous file with comments | « extensions/browser/user_script_loader.cc ('k') | extensions/browser/value_store/lazy_leveldb.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698