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()), |