diff options
author | jcivelli@chromium.org <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-20 06:48:04 +0000 |
---|---|---|
committer | jcivelli@chromium.org <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-20 06:48:04 +0000 |
commit | 70af94ccad4515ab239e77e34d46613fee9600fa (patch) | |
tree | b8baeb8935e392c02bb51954af32618e303e072d /chrome/browser/translate/translate_manager.h | |
parent | 1db15727b39ee2d203035a969ce0ec8f212b83d9 (diff) | |
download | chromium_src-70af94ccad4515ab239e77e34d46613fee9600fa.zip chromium_src-70af94ccad4515ab239e77e34d46613fee9600fa.tar.gz chromium_src-70af94ccad4515ab239e77e34d46613fee9600fa.tar.bz2 |
Revert 53016 - 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
TBR=jcivelli@chromium.org
Review URL: http://codereview.chromium.org/2881024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53019 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/translate/translate_manager.h')
-rw-r--r-- | chrome/browser/translate/translate_manager.h | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/chrome/browser/translate/translate_manager.h b/chrome/browser/translate/translate_manager.h index 54debf4..260f345 100644 --- a/chrome/browser/translate/translate_manager.h +++ b/chrome/browser/translate/translate_manager.h @@ -51,6 +51,7 @@ class TranslateManager : public NotificationObserver, void ReportLanguageDetectionError(TabContents* tab_contents); // Clears the translate script, so it will be fetched next time we translate. + // Currently used by unit-tests. void ClearTranslateScript() { translate_script_.clear(); } // NotificationObserver implementation: @@ -66,12 +67,6 @@ class TranslateManager : public NotificationObserver, const ResponseCookies& cookies, const std::string& data); - // Used by unit-tests to override the default delay after which the translate - // script is fetched again from the translation server. - void set_translate_script_expiration_delay(int delay_ms) { - translate_script_expiration_delay_ = delay_ms; - } - // Convenience method to know if a tab is showing a translate infobar. static bool IsShowingTranslateInfobar(TabContents* tab); @@ -163,10 +158,6 @@ class TranslateManager : public NotificationObserver, // The JS injected in the page to do the translation. std::string translate_script_; - // Delay in milli-seconds after which the translate script is fetched again - // from the translate server. - int translate_script_expiration_delay_; - // Whether the translate JS is currently being retrieved. bool translate_script_request_pending_; |