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

Unified Diff: chrome/browser/password_manager/password_manager_internals_service_unittest.cc

Issue 2749823002: Restore KeyedServiceFactory diagnostics for context use-after-destroy. (Closed)
Patch Set: Add test fixes, more service shutdown fixes. Created 3 years, 9 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/password_manager/password_manager_internals_service_unittest.cc
diff --git a/chrome/browser/password_manager/password_manager_internals_service_unittest.cc b/chrome/browser/password_manager/password_manager_internals_service_unittest.cc
index 07b9c7af5cd2ee62a0efe9bf977cde2af21b119c..0adebc3014748dc7b93b4d01f99d37aa85c8780b 100644
--- a/chrome/browser/password_manager/password_manager_internals_service_unittest.cc
+++ b/chrome/browser/password_manager/password_manager_internals_service_unittest.cc
@@ -30,19 +30,7 @@ enum ProfileType { NORMAL_PROFILE, INCOGNITO_PROFILE };
std::unique_ptr<TestingProfile> CreateProfile(ProfileType type) {
TestingProfile::Builder builder;
- std::unique_ptr<TestingProfile> profile(builder.Build());
sense (YandexTeam) 2017/03/15 08:36:15 This code was moved to chrome/test/base/testing_pr
vasilii 2017/03/15 10:59:24 Which line? I don't see it.
sense (YandexTeam) 2017/03/15 11:10:58 The whole block is now replaced by a single line:
-#if !defined(NDEBUG)
- // During the test cases, the profiles may get created on the same address. To
- // avoid over-zealous asserts we need to mark the newly created one as "live".
- // See declaration of MarkBrowserContextLiveForTesting for more details.
- BrowserContextDependencyManager::GetInstance()
- ->MarkBrowserContextLiveForTesting(profile.get());
- if (type == INCOGNITO_PROFILE) {
- BrowserContextDependencyManager::GetInstance()
- ->MarkBrowserContextLiveForTesting(profile->GetOffTheRecordProfile());
- }
-#endif
- return profile;
+ return builder.Build();
}
} // namespace

Powered by Google App Engine
This is Rietveld 408576698