| Index: chrome/browser/profiles/profile_destroyer_unittest.cc
|
| diff --git a/chrome/browser/profiles/profile_destroyer_unittest.cc b/chrome/browser/profiles/profile_destroyer_unittest.cc
|
| index ac0cba5695d11ff2efed32fd11ac7c60cdc26a59..7e5e4160e2df17246370c2f90f2626a575014e62 100644
|
| --- a/chrome/browser/profiles/profile_destroyer_unittest.cc
|
| +++ b/chrome/browser/profiles/profile_destroyer_unittest.cc
|
| @@ -6,8 +6,11 @@
|
|
|
| #include "base/macros.h"
|
| #include "base/run_loop.h"
|
| +#include "chrome/browser/extensions/extension_special_storage_policy.h"
|
| #include "chrome/test/base/browser_with_test_window_test.h"
|
| #include "chrome/test/base/testing_profile.h"
|
| +#include "components/policy/core/common/policy_service.h"
|
| +#include "components/sync_preferences/pref_service_syncable.h"
|
| #include "content/public/browser/render_process_host.h"
|
| #include "content/public/browser/site_instance.h"
|
|
|
| @@ -17,12 +20,18 @@ class TestingOffTheRecordDestructionProfile : public TestingProfile {
|
| : TestingProfile(
|
| base::FilePath(),
|
| NULL,
|
| - scoped_refptr<ExtensionSpecialStoragePolicy>()
|
| - std::unique_ptr<sync_preferences::PrefServiceSyncable>(),
|
| - true,
|
| - TestingFactories()),
|
| +#if BUILDFLAG(ENABLE_EXTENSIONS)
|
| + scoped_refptr<ExtensionSpecialStoragePolicy>(),
|
| +#endif
|
| + std::unique_ptr<sync_preferences::PrefServiceSyncable>(),
|
| + /*parent=*/NULL,
|
| + /*guest_session=*/true,
|
| + /*supervised_user_id=*/"",
|
| + std::unique_ptr<policy::PolicyService>(),
|
| + TestingFactories(),
|
| + /*profile_name=*/""),
|
| destroyed_otr_profile_(false) {
|
| - set_incognito(true);
|
| + ForceIncognito(true);
|
| }
|
| void DestroyOffTheRecordProfile() override {
|
| destroyed_otr_profile_ = true;
|
| @@ -109,13 +118,14 @@ TEST_F(ProfileDestroyerTest, DelayOriginalProfileDestruction) {
|
| TestingOriginalDestructionProfile* original_profile =
|
| new TestingOriginalDestructionProfile;
|
|
|
| - TestingOffTheRecordDestructionProfile* off_the_record_profile =
|
| - new TestingOffTheRecordDestructionProfile;
|
| + std::unique_ptr<TestingOffTheRecordDestructionProfile>
|
| + off_the_record_profile(new TestingOffTheRecordDestructionProfile);
|
| +
|
|
|
| - original_profile->SetOffTheRecordProfile(off_the_record_profile);
|
| + original_profile->SetOffTheRecordProfile(std::move(off_the_record_profile));
|
|
|
| - scoped_refptr<content::SiteInstance> instance1(
|
| - content::SiteInstance::Create(off_the_record_profile));
|
| + scoped_refptr<content::SiteInstance> instance1(content::SiteInstance::Create(
|
| + original_profile->GetOffTheRecordProfile()));
|
| std::unique_ptr<content::RenderProcessHost> render_process_host1;
|
| render_process_host1.reset(instance1->GetProcess());
|
| ASSERT_TRUE(render_process_host1.get() != NULL);
|
|
|