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

Unified Diff: net/extras/sqlite/sqlite_persistent_cookie_store.cc

Issue 1893083002: Change scoped_ptr to std::unique_ptr in //net. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptr-net-all: iwyu 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
Index: net/extras/sqlite/sqlite_persistent_cookie_store.cc
diff --git a/net/extras/sqlite/sqlite_persistent_cookie_store.cc b/net/extras/sqlite/sqlite_persistent_cookie_store.cc
index 911f05a95818415aa5ba9103f05bb3ed2a951768..8ee2d07e5e7da8933adfc8526512a7a5869f4fd7 100644
--- a/net/extras/sqlite/sqlite_persistent_cookie_store.cc
+++ b/net/extras/sqlite/sqlite_persistent_cookie_store.cc
@@ -5,6 +5,7 @@
#include "net/extras/sqlite/sqlite_persistent_cookie_store.h"
#include <map>
+#include <memory>
#include <set>
#include "base/bind.h"
@@ -15,7 +16,6 @@
#include "base/logging.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include "base/metrics/histogram_macros.h"
#include "base/profiler/scoped_tracker.h"
#include "base/sequenced_task_runner.h"
@@ -242,7 +242,7 @@ class SQLitePersistentCookieStore::Backend
bool success);
const base::FilePath path_;
- scoped_ptr<sql::Connection> db_;
+ std::unique_ptr<sql::Connection> db_;
sql::MetaTable meta_table_;
typedef std::list<PendingOperation*> PendingOperationsList;
@@ -819,7 +819,7 @@ void SQLitePersistentCookieStore::Backend::MakeCookiesFromSQLStatement(
} else {
value = smt.ColumnString(3);
}
- scoped_ptr<CanonicalCookie> cc(new CanonicalCookie(
+ std::unique_ptr<CanonicalCookie> cc(new CanonicalCookie(
// The "source" URL is not used with persisted cookies.
GURL(), // Source
smt.ColumnString(2), // name
@@ -1081,7 +1081,7 @@ void SQLitePersistentCookieStore::Backend::BatchOperation(
DCHECK(!background_task_runner_->RunsTasksOnCurrentThread());
// We do a full copy of the cookie here, and hopefully just here.
- scoped_ptr<PendingOperation> po(new PendingOperation(op, cc));
+ std::unique_ptr<PendingOperation> po(new PendingOperation(op, cc));
PendingOperationsList::size_type num_pending;
{
@@ -1144,7 +1144,7 @@ void SQLitePersistentCookieStore::Backend::Commit() {
for (PendingOperationsList::iterator it = ops.begin(); it != ops.end();
++it) {
// Free the cookies as we commit them to the database.
- scoped_ptr<PendingOperation> po(*it);
+ std::unique_ptr<PendingOperation> po(*it);
switch (po->op()) {
case PendingOperation::COOKIE_ADD:
add_smt.Reset(true);
« no previous file with comments | « net/extras/sqlite/sqlite_channel_id_store_unittest.cc ('k') | net/extras/sqlite/sqlite_persistent_cookie_store_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698