From 7d8016cc4a114725448c73d278e6af1c1475761e Mon Sep 17 00:00:00 2001
From: "jcivelli@chromium.org"
 <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Tue, 20 Jul 2010 06:27:51 +0000
Subject: 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
---
 chrome/browser/cocoa/translate/translate_infobar_base.mm | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'chrome/browser/cocoa/translate/translate_infobar_base.mm')

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];
-- 
cgit v1.1