Chromium Code Reviews| Index: chrome/browser/translate/options_menu_model.cc |
| =================================================================== |
| --- chrome/browser/translate/options_menu_model.cc (revision 103457) |
| +++ chrome/browser/translate/options_menu_model.cc (working copy) |
| @@ -88,6 +88,17 @@ |
| return (!translate_infobar_delegate_->IsLanguageBlacklisted() && |
| !translate_infobar_delegate_->IsSiteBlacklisted()); |
| + case IDC_TRANSLATE_REPORT_BAD_LANGUAGE_DETECTION : { |
| + // Until we have a secure URL for reporting language detection errors, |
| + // we don't report errors that happened on secure URLs. |
| + DCHECK(translate_infobar_delegate_ != NULL); |
| + TabContents* tab_contents = translate_infobar_delegate_->tab_contents(); |
| + if (tab_contents) { |
|
jochen (gone - plz use gerrit)
2011/09/30 18:22:22
I think tab_contents can't be NULL. The constructo
|
| + NavigationEntry* entry = tab_contents->controller().GetActiveEntry(); |
| + if (entry) |
|
jochen (gone - plz use gerrit)
2011/09/30 18:22:22
shouldn't we rather return false if there's no ent
|
| + return !entry->url().SchemeIsSecure(); |
| + } |
| + } |
| default: |
| break; |
| } |