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

Unified Diff: chrome/browser/translate/translate_infobar_delegate.h

Issue 7589002: Fix a crash in the translate info bar. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' 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 | chrome/browser/translate/translate_infobar_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/translate/translate_infobar_delegate.h
===================================================================
--- chrome/browser/translate/translate_infobar_delegate.h (revision 95968)
+++ chrome/browser/translate/translate_infobar_delegate.h (working copy)
@@ -36,11 +36,12 @@
static const size_t kNoIndex;
- // Factory method to create a non-error translate infobar.
- // The original and target language specified are the ASCII language codes
- // (ex: en, fr...).
- // Returns NULL if it failed, typically if |original_language| or
- // |target_language| is not a supported language.
+ // Factory method to create a non-error translate infobar. |original_language|
+ // and |target_language| must be ASCII language codes (e.g. "en", "fr", etc.)
+ // for languages the TranslateManager supports translating. The lone exception
+ // is when the user initiates translation from the context menu, in which case
+ // it's legal to call this with |type| == TRANSLATING and
+ // |originalLanguage| == kUnknownLanguageCode.
static TranslateInfoBarDelegate* CreateDelegate(
Type infobar_type,
TabContents* tab_contents,
« no previous file with comments | « no previous file | chrome/browser/translate/translate_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698