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

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

Issue 292513002: Remove dependency of TranslateInfobarDelegate on chrome/ and content/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comments Created 6 years, 7 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/translate/translate_tab_helper.cc
diff --git a/chrome/browser/translate/translate_tab_helper.cc b/chrome/browser/translate/translate_tab_helper.cc
index c7af593346ae726f7cd21c8c06485aceb61c32a5..711a0d13d83031626ac2fdc1349cf1d57132f1f4 100644
--- a/chrome/browser/translate/translate_tab_helper.cc
+++ b/chrome/browser/translate/translate_tab_helper.cc
@@ -174,19 +174,15 @@ void TranslateTabHelper::ShowTranslateUI(translate::TranslateStep step,
}
// Infobar UI.
- Profile* profile =
- Profile::FromBrowserContext(web_contents()->GetBrowserContext());
- Profile* original_profile = profile->GetOriginalProfile();
TranslateInfoBarDelegate::Create(
step != translate::TRANSLATE_STEP_BEFORE_TRANSLATE,
translate_manager_->GetWeakPtr(),
InfoBarService::FromWebContents(web_contents()),
- profile->IsOffTheRecord(),
+ web_contents()->GetBrowserContext()->IsOffTheRecord(),
step,
source_language,
target_language,
error_type,
- original_profile->GetPrefs(),
triggered_from_menu);
}
« no previous file with comments | « chrome/browser/translate/translate_infobar_delegate.cc ('k') | chrome/browser/ui/cocoa/infobars/translate_infobar_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698