summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/translate/translate_infobar_base.mm
diff options
context:
space:
mode:
authorjcivelli@chromium.org <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-20 06:27:51 +0000
committerjcivelli@chromium.org <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-20 06:27:51 +0000
commit7d8016cc4a114725448c73d278e6af1c1475761e (patch)
tree2ac4b4ff062bd251c6896ee5d439b28877230141 /chrome/browser/cocoa/translate/translate_infobar_base.mm
parent57d746a759f872a775683d5b9409e547a871443b (diff)
downloadchromium_src-7d8016cc4a114725448c73d278e6af1c1475761e.zip
chromium_src-7d8016cc4a114725448c73d278e6af1c1475761e.tar.gz
chromium_src-7d8016cc4a114725448c73d278e6af1c1475761e.tar.bz2
Makes the browser fetch the translate script regularly.
New versions of that script may get pushed from time to time. Fetching the script again ensures people that don't restart their browser for long periods of time still get the new versions. Also renamed the enum from constant style to macro-style, as it is the Chromium way to go from the Chromium style guide (which is in that regard different than the Google style guide). BUG=None TEST=Run the unit-tests. Original review: http://codereview.chromium.org/3034013/show Review URL: http://codereview.chromium.org/3041010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53016 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/translate/translate_infobar_base.mm')
-rw-r--r--chrome/browser/cocoa/translate/translate_infobar_base.mm8
1 files changed, 4 insertions, 4 deletions
diff --git a/chrome/browser/cocoa/translate/translate_infobar_base.mm b/chrome/browser/cocoa/translate/translate_infobar_base.mm
index 108ce74..fb7dd5a 100644
--- a/chrome/browser/cocoa/translate/translate_infobar_base.mm
+++ b/chrome/browser/cocoa/translate/translate_infobar_base.mm
@@ -471,7 +471,7 @@ InfoBar* TranslateInfoBarDelegate::CreateInfoBar() {
[self rebuildOptionsMenu:NO];
[[optionsPopUp_ cell] setArrowPosition:NSPopUpArrowAtBottom];
[optionsPopUp_ sizeToFit];
-
+
MoveControl(closeButton_, optionsPopUp_, spaceBetweenControls_, false);
if (!VerifyControlOrderAndSpacing(lastView, optionsPopUp_)) {
[self rebuildOptionsMenu:YES];
@@ -490,8 +490,8 @@ InfoBar* TranslateInfoBarDelegate::CreateInfoBar() {
- (IBAction)ok:(id)sender {
TranslateInfoBarDelegate* delegate = [self delegate];
TranslateInfoBarDelegate::Type state = delegate->type();
- DCHECK(state == TranslateInfoBarDelegate::kBeforeTranslate ||
- state == TranslateInfoBarDelegate::kTranslationError);
+ DCHECK(state == TranslateInfoBarDelegate::BEFORE_TRANSLATE ||
+ state == TranslateInfoBarDelegate::TRANSLATION_ERROR);
delegate->Translate();
UMA_HISTOGRAM_COUNTS("Translate.Translate", 1);
}
@@ -499,7 +499,7 @@ InfoBar* TranslateInfoBarDelegate::CreateInfoBar() {
// Called when someone clicks on the "Nope" button.
- (IBAction)cancel:(id)sender {
DCHECK(
- [self delegate]->type() == TranslateInfoBarDelegate::kBeforeTranslate);
+ [self delegate]->type() == TranslateInfoBarDelegate::BEFORE_TRANSLATE);
[self delegate]->TranslationDeclined();
UMA_HISTOGRAM_COUNTS("Translate.DeclineTranslate", 1);
[super dismiss:nil];