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

Unified Diff: chrome/browser/profiles/profile_impl.cc

Issue 10645005: Modify ProfileDestroyer to prevent leaks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 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
« no previous file with comments | « chrome/browser/profiles/profile_destroyer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_impl.cc
===================================================================
--- chrome/browser/profiles/profile_impl.cc (revision 143631)
+++ chrome/browser/profiles/profile_impl.cc (working copy)
@@ -59,6 +59,7 @@
#include "chrome/browser/profiles/chrome_version_service.h"
#include "chrome/browser/profiles/gaia_info_update_service.h"
#include "chrome/browser/profiles/profile_dependency_manager.h"
+#include "chrome/browser/profiles/profile_destroyer.h"
#include "chrome/browser/profiles/profile_info_cache.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/search_engines/template_url_fetcher.h"
@@ -501,7 +502,13 @@
}
// Destroy OTR profile and its profile services first.
- DestroyOffTheRecordProfile();
+ if (off_the_record_profile_.get()) {
+ ProfileDestroyer::DestroyOffTheRecordProfileNow(
+ off_the_record_profile_.get());
+ } else {
+ ExtensionPrefValueMapFactory::GetForProfile(this)->
+ ClearAllIncognitoSessionOnlyPreferences();
+ }
ProfileDependencyManager::GetInstance()->DestroyProfileServices(this);
« no previous file with comments | « chrome/browser/profiles/profile_destroyer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698