| Index: sql/recovery.h
|
| diff --git a/sql/recovery.h b/sql/recovery.h
|
| index af99108192908593db1ef4844086324609f35a2b..8efd71877318b04f1df5486f135257038717918d 100644
|
| --- a/sql/recovery.h
|
| +++ b/sql/recovery.h
|
| @@ -7,6 +7,8 @@
|
|
|
| #include <stddef.h>
|
|
|
| +#include <memory>
|
| +
|
| #include "base/macros.h"
|
| #include "sql/connection.h"
|
|
|
| @@ -25,7 +27,7 @@ namespace sql {
|
| // not accidentally disrupt the restored data.
|
| //
|
| // {
|
| -// scoped_ptr<sql::Recovery> r =
|
| +// std::unique_ptr<sql::Recovery> r =
|
| // sql::Recovery::Begin(orig_db, orig_db_path);
|
| // if (r) {
|
| // // Create the schema to recover to. On failure, clear the
|
| @@ -80,9 +82,9 @@ class SQL_EXPORT Recovery {
|
| // TODO(shess): Later versions of SQLite allow extracting the path
|
| // from the connection.
|
| // TODO(shess): Allow specifying the connection point?
|
| - static scoped_ptr<Recovery> Begin(
|
| - Connection* connection,
|
| - const base::FilePath& db_path) WARN_UNUSED_RESULT;
|
| + static std::unique_ptr<Recovery> Begin(Connection* connection,
|
| + const base::FilePath& db_path)
|
| + WARN_UNUSED_RESULT;
|
|
|
| // Mark recovery completed by replicating the recovery database over
|
| // the original database, then closing the recovery database. The
|
| @@ -95,11 +97,11 @@ class SQL_EXPORT Recovery {
|
| // TODO(shess): At this time, this function can fail while leaving
|
| // the original database intact. Figure out which failure cases
|
| // should go to RazeAndClose() instead.
|
| - static bool Recovered(scoped_ptr<Recovery> r) WARN_UNUSED_RESULT;
|
| + static bool Recovered(std::unique_ptr<Recovery> r) WARN_UNUSED_RESULT;
|
|
|
| // Indicate that the database is unrecoverable. The original
|
| // database is razed, and the handle poisoned.
|
| - static void Unrecoverable(scoped_ptr<Recovery> r);
|
| + static void Unrecoverable(std::unique_ptr<Recovery> r);
|
|
|
| // When initially developing recovery code, sometimes the possible
|
| // database states are not well-understood without further
|
| @@ -107,7 +109,7 @@ class SQL_EXPORT Recovery {
|
| // database.
|
| // NOTE(shess): Only call this when adding recovery support. In the
|
| // steady state, all databases should progress to recovered or razed.
|
| - static void Rollback(scoped_ptr<Recovery> r);
|
| + static void Rollback(std::unique_ptr<Recovery> r);
|
|
|
| // Handle to the temporary recovery database.
|
| sql::Connection* db() { return &recover_db_; }
|
|
|