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

Unified Diff: components/storage_monitor/storage_monitor_linux_unittest.cc

Issue 1884743002: Convert a few components from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: lint 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: components/storage_monitor/storage_monitor_linux_unittest.cc
diff --git a/components/storage_monitor/storage_monitor_linux_unittest.cc b/components/storage_monitor/storage_monitor_linux_unittest.cc
index 03a7dd5754a0edf0165c372755e414571d19af7e..4582e8b07bce3aeaefb8d960c393b983ff0372ed 100644
--- a/components/storage_monitor/storage_monitor_linux_unittest.cc
+++ b/components/storage_monitor/storage_monitor_linux_unittest.cc
@@ -11,13 +11,13 @@
#include <stdint.h>
#include <stdio.h>
+#include <memory>
#include <string>
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/logging.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/run_loop.h"
#include "base/strings/utf_string_conversions.h"
#include "base/thread_task_runner_handle.h"
@@ -72,8 +72,8 @@ const TestDeviceData kTestDeviceData[] = {
StorageInfo::FIXED_MASS_STORAGE, 17282 },
};
-scoped_ptr<StorageInfo> GetDeviceInfo(const base::FilePath& device_path,
- const base::FilePath& mount_point) {
+std::unique_ptr<StorageInfo> GetDeviceInfo(const base::FilePath& device_path,
+ const base::FilePath& mount_point) {
bool device_found = false;
size_t i = 0;
for (; i < arraysize(kTestDeviceData); i++) {
@@ -83,7 +83,7 @@ scoped_ptr<StorageInfo> GetDeviceInfo(const base::FilePath& device_path,
}
}
- scoped_ptr<StorageInfo> storage_info;
+ std::unique_ptr<StorageInfo> storage_info;
if (!device_found) {
NOTREACHED();
return storage_info;
@@ -304,14 +304,14 @@ class StorageMonitorLinuxTest : public testing::Test {
content::TestBrowserThreadBundle thread_bundle_;
- scoped_ptr<MockRemovableStorageObserver> mock_storage_observer_;
+ std::unique_ptr<MockRemovableStorageObserver> mock_storage_observer_;
// Temporary directory for created test data.
base::ScopedTempDir scoped_temp_dir_;
// Path to the test mtab file.
base::FilePath mtab_file_;
- scoped_ptr<TestStorageMonitorLinux> monitor_;
+ std::unique_ptr<TestStorageMonitorLinux> monitor_;
DISALLOW_COPY_AND_ASSIGN(StorageMonitorLinuxTest);
};
« no previous file with comments | « components/storage_monitor/storage_monitor_linux.cc ('k') | components/storage_monitor/storage_monitor_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698