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

Unified Diff: chrome/browser/translate/translate_manager.cc

Issue 7608024: Make the TranslateManager listen for the destruction of the right profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 9 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/translate/translate_manager.cc
diff --git a/chrome/browser/translate/translate_manager.cc b/chrome/browser/translate/translate_manager.cc
index b2a51d5884edf93316993ca26eae78a7b0527b0e..b75fe3af305768950991891bbe0a6e562f1f1031 100644
--- a/chrome/browser/translate/translate_manager.cc
+++ b/chrome/browser/translate/translate_manager.cc
@@ -651,7 +651,8 @@ void TranslateManager::PageTranslated(TabContents* tab,
bool TranslateManager::IsAcceptLanguage(TabContents* tab,
const std::string& language) {
Profile* profile = Profile::FromBrowserContext(tab->browser_context());
- PrefService* pref_service = profile->GetOriginalProfile()->GetPrefs();
+ profile = profile->GetOriginalProfile();
+ PrefService* pref_service = profile->GetPrefs();
PrefServiceLanguagesMap::const_iterator iter =
accept_languages_.find(pref_service);
if (iter == accept_languages_.end()) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698