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

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

Issue 10830353: Introduce InfoBarTabService API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Respond to review comments, merge to LKGR Created 8 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
Index: chrome/browser/translate/options_menu_model.cc
diff --git a/chrome/browser/translate/options_menu_model.cc b/chrome/browser/translate/options_menu_model.cc
index 4680ef29e68a027e52c85b80123d5df29c6c7c9e..9631d8a2010871e97769649c203e5099ff6692a6 100644
--- a/chrome/browser/translate/options_menu_model.cc
+++ b/chrome/browser/translate/options_menu_model.cc
@@ -33,7 +33,7 @@ OptionsMenuModel::OptionsMenuModel(
// Populate the menu.
// Incognito mode does not get any preferences related items.
- if (!translate_delegate->owner()->web_contents()->
+ if (!translate_delegate->owner()->GetWebContents()->
GetBrowserContext()->IsOffTheRecord()) {
AddCheckItem(IDC_TRANSLATE_OPTIONS_ALWAYS,
l10n_util::GetStringFUTF16(IDS_TRANSLATE_INFOBAR_OPTIONS_ALWAYS,
@@ -90,9 +90,9 @@ bool OptionsMenuModel::IsCommandIdEnabled(int command_id) const {
// we don't report errors that happened on secure URLs.
DCHECK(translate_infobar_delegate_ != NULL);
DCHECK(translate_infobar_delegate_->owner() != NULL);
- DCHECK(translate_infobar_delegate_->owner()->web_contents() != NULL);
+ DCHECK(translate_infobar_delegate_->owner()->GetWebContents() != NULL);
NavigationEntry* entry = translate_infobar_delegate_->owner()->
- web_contents()->GetController().GetActiveEntry();
+ GetWebContents()->GetController().GetActiveEntry();
// Delegate and tab contents should never be NULL, but active entry
// can be NULL when running tests. We want to return false if NULL.
return (entry != NULL) && !entry->GetURL().SchemeIsSecure();
@@ -131,7 +131,7 @@ void OptionsMenuModel::ExecuteCommand(int command_id) {
case IDC_TRANSLATE_OPTIONS_ABOUT: {
WebContents* web_contents =
- translate_infobar_delegate_->owner()->web_contents();
+ translate_infobar_delegate_->owner()->GetWebContents();
if (web_contents) {
OpenURLParams params(
GURL(chrome::kAboutGoogleTranslateURL), Referrer(),
« no previous file with comments | « chrome/browser/task_manager/task_manager_browsertest.cc ('k') | chrome/browser/translate/translate_infobar_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698