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

Side by Side Diff: chrome/browser/extensions/external_provider_impl_chromeos_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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/extensions/external_provider_impl.h" 5 #include "chrome/browser/extensions/external_provider_impl.h"
6 6
7 #include <memory>
8
7 #include "base/command_line.h" 9 #include "base/command_line.h"
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "base/test/scoped_path_override.h" 11 #include "base/test/scoped_path_override.h"
11 #include "chrome/browser/chrome_notification_types.h" 12 #include "chrome/browser/chrome_notification_types.h"
12 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" 13 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h"
13 #include "chrome/browser/chromeos/customization/customization_document.h" 14 #include "chrome/browser/chromeos/customization/customization_document.h"
14 #include "chrome/browser/chromeos/login/users/scoped_user_manager_enabler.h" 15 #include "chrome/browser/chromeos/login/users/scoped_user_manager_enabler.h"
15 #include "chrome/browser/extensions/extension_service.h" 16 #include "chrome/browser/extensions/extension_service.h"
16 #include "chrome/browser/extensions/extension_service_test_base.h" 17 #include "chrome/browser/extensions/extension_service_test_base.h"
17 #include "chrome/browser/prefs/pref_service_syncable_util.h" 18 #include "chrome/browser/prefs/pref_service_syncable_util.h"
18 #include "chrome/browser/profiles/profile_manager.h" 19 #include "chrome/browser/profiles/profile_manager.h"
19 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" 20 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 // ExtensionServiceTestBase overrides: 81 // ExtensionServiceTestBase overrides:
81 void SetUp() override { 82 void SetUp() override {
82 ExtensionServiceTestBase::SetUp(); 83 ExtensionServiceTestBase::SetUp();
83 } 84 }
84 85
85 void TearDown() override { 86 void TearDown() override {
86 chromeos::KioskAppManager::Shutdown(); 87 chromeos::KioskAppManager::Shutdown();
87 } 88 }
88 89
89 private: 90 private:
90 scoped_ptr<base::ScopedPathOverride> external_externsions_overrides_; 91 std::unique_ptr<base::ScopedPathOverride> external_externsions_overrides_;
91 chromeos::system::ScopedFakeStatisticsProvider fake_statistics_provider_; 92 chromeos::system::ScopedFakeStatisticsProvider fake_statistics_provider_;
92 user_manager::FakeUserManager* fake_user_manager_; 93 user_manager::FakeUserManager* fake_user_manager_;
93 chromeos::ScopedUserManagerEnabler scoped_user_manager_; 94 chromeos::ScopedUserManagerEnabler scoped_user_manager_;
94 95
95 DISALLOW_COPY_AND_ASSIGN(ExternalProviderImplChromeOSTest); 96 DISALLOW_COPY_AND_ASSIGN(ExternalProviderImplChromeOSTest);
96 }; 97 };
97 98
98 } // namespace 99 } // namespace
99 100
100 // Normal mode, external app should be installed. 101 // Normal mode, external app should be installed.
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 "test_user@gmail.com"); 193 "test_user@gmail.com");
193 194
194 // App sync will wait for priority sync to complete. 195 // App sync will wait for priority sync to complete.
195 service_->CheckForExternalUpdates(); 196 service_->CheckForExternalUpdates();
196 197
197 // Priority sync completed. 198 // Priority sync completed.
198 PrefServiceSyncableFromProfile(profile_.get()) 199 PrefServiceSyncableFromProfile(profile_.get())
199 ->GetSyncableService(syncer::PRIORITY_PREFERENCES) 200 ->GetSyncableService(syncer::PRIORITY_PREFERENCES)
200 ->MergeDataAndStartSyncing(syncer::PRIORITY_PREFERENCES, 201 ->MergeDataAndStartSyncing(syncer::PRIORITY_PREFERENCES,
201 syncer::SyncDataList(), 202 syncer::SyncDataList(),
202 scoped_ptr<syncer::SyncChangeProcessor>( 203 std::unique_ptr<syncer::SyncChangeProcessor>(
203 new syncer::FakeSyncChangeProcessor), 204 new syncer::FakeSyncChangeProcessor),
204 scoped_ptr<syncer::SyncErrorFactory>( 205 std::unique_ptr<syncer::SyncErrorFactory>(
205 new syncer::SyncErrorFactoryMock())); 206 new syncer::SyncErrorFactoryMock()));
206 207
207 content::WindowedNotificationObserver( 208 content::WindowedNotificationObserver(
208 extensions::NOTIFICATION_CRX_INSTALLER_DONE, 209 extensions::NOTIFICATION_CRX_INSTALLER_DONE,
209 content::NotificationService::AllSources()).Wait(); 210 content::NotificationService::AllSources()).Wait();
210 211
211 EXPECT_TRUE(service_->GetInstalledExtension(kStandaloneAppId)); 212 EXPECT_TRUE(service_->GetInstalledExtension(kStandaloneAppId));
212 } 213 }
213 214
214 } // namespace extensions 215 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/external_provider_impl.cc ('k') | chrome/browser/extensions/external_provider_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698