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

Unified Diff: chrome/browser/chromeos/preferences_unittest.cc

Issue 1870793002: Convert //chrome/browser/chromeos from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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/chromeos/preferences_unittest.cc
diff --git a/chrome/browser/chromeos/preferences_unittest.cc b/chrome/browser/chromeos/preferences_unittest.cc
index fd283a13f7471c883ea39869e967d4576c592227..cb831329151ef22a9cc61c8a3fe4e1e98eee3f22 100644
--- a/chrome/browser/chromeos/preferences_unittest.cc
+++ b/chrome/browser/chromeos/preferences_unittest.cc
@@ -115,7 +115,7 @@ class MyMockInputMethodManager : public MockInputMethodManager {
private:
MyMockInputMethodManager* const manager_;
- scoped_ptr<InputMethodDescriptors> input_method_extensions_;
+ std::unique_ptr<InputMethodDescriptors> input_method_extensions_;
};
MyMockInputMethodManager(StringPrefMember* previous,
@@ -127,7 +127,8 @@ class MyMockInputMethodManager : public MockInputMethodManager {
~MyMockInputMethodManager() override {}
- scoped_ptr<InputMethodDescriptors> GetSupportedInputMethods() const override {
+ std::unique_ptr<InputMethodDescriptors> GetSupportedInputMethods()
+ const override {
return whitelist_.GetSupportedInputMethods();
}
@@ -198,9 +199,9 @@ class PreferencesTest : public testing::Test {
}
content::TestBrowserThreadBundle thread_bundle_;
- scoped_ptr<TestingProfileManager> profile_manager_;
- scoped_ptr<chromeos::ScopedUserManagerEnabler> user_manager_enabler_;
- scoped_ptr<Preferences> prefs_;
+ std::unique_ptr<TestingProfileManager> profile_manager_;
+ std::unique_ptr<chromeos::ScopedUserManagerEnabler> user_manager_enabler_;
+ std::unique_ptr<Preferences> prefs_;
StringPrefMember previous_input_method_;
StringPrefMember current_input_method_;
@@ -269,9 +270,10 @@ class InputMethodPreferencesTest : public PreferencesTest {
mock_delegate->set_ime_list(CreateImeList());
// Pass the mock delegate to a new ComponentExtensionIMEManager.
- scoped_ptr<ComponentExtensionIMEManagerDelegate> delegate(mock_delegate);
- scoped_ptr<ComponentExtensionIMEManager> component_extension_ime_manager(
- new ComponentExtensionIMEManager);
+ std::unique_ptr<ComponentExtensionIMEManagerDelegate> delegate(
+ mock_delegate);
+ std::unique_ptr<ComponentExtensionIMEManager>
+ component_extension_ime_manager(new ComponentExtensionIMEManager);
component_extension_ime_manager->Initialize(std::move(delegate));
// Add the ComponentExtensionIMEManager to the mock InputMethodManager.
@@ -391,11 +393,10 @@ TEST_F(InputMethodPreferencesTest, TestOobeAndSync) {
syncer::SyncableService* sync =
pref_service_->GetSyncableService(
syncer::PREFERENCES);
- sync->MergeDataAndStartSyncing(syncer::PREFERENCES,
- sync_data_list,
- scoped_ptr<syncer::SyncChangeProcessor>(
+ sync->MergeDataAndStartSyncing(syncer::PREFERENCES, sync_data_list,
+ std::unique_ptr<syncer::SyncChangeProcessor>(
new syncer::FakeSyncChangeProcessor),
- scoped_ptr<syncer::SyncErrorFactory>(
+ std::unique_ptr<syncer::SyncErrorFactory>(
new syncer::SyncErrorFactoryMock));
content::RunAllBlockingPoolTasksUntilIdle();
@@ -484,11 +485,10 @@ TEST_F(InputMethodPreferencesTest, TestLogIn) {
syncer::SyncableService* sync =
pref_service_->GetSyncableService(
syncer::PREFERENCES);
- sync->MergeDataAndStartSyncing(syncer::PREFERENCES,
- sync_data_list,
- scoped_ptr<syncer::SyncChangeProcessor>(
+ sync->MergeDataAndStartSyncing(syncer::PREFERENCES, sync_data_list,
+ std::unique_ptr<syncer::SyncChangeProcessor>(
new syncer::FakeSyncChangeProcessor),
- scoped_ptr<syncer::SyncErrorFactory>(
+ std::unique_ptr<syncer::SyncErrorFactory>(
new syncer::SyncErrorFactoryMock));
content::RunAllBlockingPoolTasksUntilIdle();
{
@@ -525,11 +525,10 @@ TEST_F(InputMethodPreferencesTest, TestLogInLegacy) {
syncer::SyncableService* sync =
pref_service_->GetSyncableService(
syncer::PREFERENCES);
- sync->MergeDataAndStartSyncing(syncer::PREFERENCES,
- sync_data_list,
- scoped_ptr<syncer::SyncChangeProcessor>(
+ sync->MergeDataAndStartSyncing(syncer::PREFERENCES, sync_data_list,
+ std::unique_ptr<syncer::SyncChangeProcessor>(
new syncer::FakeSyncChangeProcessor),
- scoped_ptr<syncer::SyncErrorFactory>(
+ std::unique_ptr<syncer::SyncErrorFactory>(
new syncer::SyncErrorFactoryMock));
content::RunAllBlockingPoolTasksUntilIdle();
{
@@ -584,11 +583,10 @@ TEST_F(InputMethodPreferencesTest, MergeStressTest) {
syncer::SyncableService* sync =
pref_service_->GetSyncableService(
syncer::PREFERENCES);
- sync->MergeDataAndStartSyncing(syncer::PREFERENCES,
- sync_data_list,
- scoped_ptr<syncer::SyncChangeProcessor>(
+ sync->MergeDataAndStartSyncing(syncer::PREFERENCES, sync_data_list,
+ std::unique_ptr<syncer::SyncChangeProcessor>(
new syncer::FakeSyncChangeProcessor),
- scoped_ptr<syncer::SyncErrorFactory>(
+ std::unique_ptr<syncer::SyncErrorFactory>(
new syncer::SyncErrorFactoryMock));
content::RunAllBlockingPoolTasksUntilIdle();
{
@@ -637,11 +635,10 @@ TEST_F(InputMethodPreferencesTest, MergeInvalidValues) {
syncer::SyncableService* sync =
pref_service_->GetSyncableService(
syncer::PREFERENCES);
- sync->MergeDataAndStartSyncing(syncer::PREFERENCES,
- sync_data_list,
- scoped_ptr<syncer::SyncChangeProcessor>(
+ sync->MergeDataAndStartSyncing(syncer::PREFERENCES, sync_data_list,
+ std::unique_ptr<syncer::SyncChangeProcessor>(
new syncer::FakeSyncChangeProcessor),
- scoped_ptr<syncer::SyncErrorFactory>(
+ std::unique_ptr<syncer::SyncErrorFactory>(
new syncer::SyncErrorFactoryMock));
content::RunAllBlockingPoolTasksUntilIdle();
{
@@ -680,11 +677,10 @@ TEST_F(InputMethodPreferencesTest, MergeAfterSyncing) {
syncer::SyncableService* sync =
pref_service_->GetSyncableService(
syncer::PREFERENCES);
- sync->MergeDataAndStartSyncing(syncer::PREFERENCES,
- sync_data_list,
- scoped_ptr<syncer::SyncChangeProcessor>(
+ sync->MergeDataAndStartSyncing(syncer::PREFERENCES, sync_data_list,
+ std::unique_ptr<syncer::SyncChangeProcessor>(
new syncer::FakeSyncChangeProcessor),
- scoped_ptr<syncer::SyncErrorFactory>(
+ std::unique_ptr<syncer::SyncErrorFactory>(
new syncer::SyncErrorFactoryMock));
content::RunAllBlockingPoolTasksUntilIdle();
InitPreferences();

Powered by Google App Engine
This is Rietveld 408576698