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

Unified Diff: chrome/browser/extensions/api/signed_in_devices/signed_in_devices_api_unittest.cc

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix header 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: chrome/browser/extensions/api/signed_in_devices/signed_in_devices_api_unittest.cc
diff --git a/chrome/browser/extensions/api/signed_in_devices/signed_in_devices_api_unittest.cc b/chrome/browser/extensions/api/signed_in_devices/signed_in_devices_api_unittest.cc
index f0153a1f1f46399d08169c8ed738d88a70daca10..05e3d8f63ce17b01d34745571b529fefea9ecb1b 100644
--- a/chrome/browser/extensions/api/signed_in_devices/signed_in_devices_api_unittest.cc
+++ b/chrome/browser/extensions/api/signed_in_devices/signed_in_devices_api_unittest.cc
@@ -2,15 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include <string>
+#include "chrome/browser/extensions/api/signed_in_devices/signed_in_devices_api.h"
+#include <memory>
+#include <string>
#include <vector>
#include "base/guid.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
#include "base/thread_task_runner_handle.h"
#include "base/values.h"
-#include "chrome/browser/extensions/api/signed_in_devices/signed_in_devices_api.h"
#include "chrome/browser/extensions/extension_api_unittest.h"
#include "chrome/browser/extensions/test_extension_prefs.h"
#include "chrome/browser/profiles/profile.h"
@@ -37,10 +38,10 @@ class MockDeviceInfoTracker : public DeviceInfoTracker {
bool IsSyncing() const override { return !devices_.empty(); }
- scoped_ptr<DeviceInfo> GetDeviceInfo(
+ std::unique_ptr<DeviceInfo> GetDeviceInfo(
const std::string& client_id) const override {
NOTREACHED();
- return scoped_ptr<DeviceInfo>();
+ return std::unique_ptr<DeviceInfo>();
}
static DeviceInfo* CloneDeviceInfo(const DeviceInfo* device_info) {
@@ -152,9 +153,9 @@ class ProfileSyncServiceMockForExtensionTests:
MOCK_CONST_METHOD0(GetDeviceInfoTracker, DeviceInfoTracker*());
};
-scoped_ptr<KeyedService> CreateProfileSyncServiceMock(
+std::unique_ptr<KeyedService> CreateProfileSyncServiceMock(
content::BrowserContext* context) {
- return make_scoped_ptr(new ProfileSyncServiceMockForExtensionTests(
+ return base::WrapUnique(new ProfileSyncServiceMockForExtensionTests(
Profile::FromBrowserContext(context)));
}
@@ -182,7 +183,7 @@ void VerifyDictionaryWithDeviceInfo(const base::DictionaryValue* actual_value,
std::string public_id = GetPublicId(actual_value);
device_info->set_public_id(public_id);
- scoped_ptr<base::DictionaryValue> expected_value(device_info->ToValue());
+ std::unique_ptr<base::DictionaryValue> expected_value(device_info->ToValue());
EXPECT_TRUE(expected_value->Equals(actual_value));
}
@@ -224,8 +225,8 @@ TEST_F(ExtensionSignedInDevicesTest, GetAll) {
EXPECT_CALL(*pss_mock, Shutdown());
- scoped_ptr<base::ListValue> result(RunFunctionAndReturnList(
- new SignedInDevicesGetFunction(), "[null]"));
+ std::unique_ptr<base::ListValue> result(
+ RunFunctionAndReturnList(new SignedInDevicesGetFunction(), "[null]"));
// Ensure dictionary matches device info.
VerifyDictionaryWithDeviceInfo(GetDictionaryFromList(0, result.get()),

Powered by Google App Engine
This is Rietveld 408576698