Index: components/translate/core/browser/translate_manager.h |
diff --git a/components/translate/core/browser/translate_manager.h b/components/translate/core/browser/translate_manager.h |
index 74abcca48d12944762a8170aa723d5d4182b7f82..057df12b66a56cd93143a794998a5dd445edcf61 100644 |
--- a/components/translate/core/browser/translate_manager.h |
+++ b/components/translate/core/browser/translate_manager.h |
@@ -99,6 +99,10 @@ class TranslateManager { |
// Gets the LanguageState associated with the TranslateManager |
LanguageState& GetLanguageState(); |
+ // By default, don't offer to translate in builds lacking an API key. For |
+ // testing, set to true to offer anyway. |
+ static void SetIgnoreMissingKeyForTesting(bool ignore); |
+ |
private: |
// Sends a translation request to the TranslateDriver. |
void DoTranslatePage(const std::string& translate_script, |
@@ -125,6 +129,10 @@ class TranslateManager { |
base::WeakPtrFactory<TranslateManager> weak_method_factory_; |
+ // By default, don't offer to translate in builds lacking an API key. For |
+ // testing, set to true to offer anyway. |
+ static bool ignore_missing_key_for_testing_; |
+ |
DISALLOW_COPY_AND_ASSIGN(TranslateManager); |
}; |