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

Unified Diff: sql/test/test_helpers.cc

Issue 1851913002: Convert //sql to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: IWYU fixup in precache_url_table_unittest.cc 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 | « sql/test/sql_test_base.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sql/test/test_helpers.cc
diff --git a/sql/test/test_helpers.cc b/sql/test/test_helpers.cc
index 40cbe1d4dd27f87dc231eb1b73db952151779ce2..77a05d8255a00d6572fa2a1fe886ac357ec064d3 100644
--- a/sql/test/test_helpers.cc
+++ b/sql/test/test_helpers.cc
@@ -7,6 +7,7 @@
#include <stddef.h>
#include <stdint.h>
+#include <memory>
#include <string>
#include "base/files/file_util.h"
@@ -135,7 +136,7 @@ bool CorruptTableOrIndex(const base::FilePath& db_path,
// SQLite uses 1-based page numbering.
const long int page_ofs = (page_number - 1) * page_size;
- scoped_ptr<char[]> page_buf(new char[page_size]);
+ std::unique_ptr<char[]> page_buf(new char[page_size]);
// Get the page into page_buf.
base::ScopedFILE file(base::OpenFile(db_path, "rb+"));
@@ -162,7 +163,7 @@ bool CorruptTableOrIndex(const base::FilePath& db_path,
// Check that the stored page actually changed. This catches usage
// errors where |update_sql| is not related to |tree_name|.
- scoped_ptr<char[]> check_page_buf(new char[page_size]);
+ std::unique_ptr<char[]> check_page_buf(new char[page_size]);
// The on-disk data should have changed.
if (0 != fflush(file.get()))
return false;
« no previous file with comments | « sql/test/sql_test_base.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698