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

Unified Diff: chrome/browser/translate/translate_service.cc

Issue 1185703007: Disable translate when there is no API key (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment Created 5 years, 5 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 | components/translate/core/browser/translate_browser_metrics.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/translate/translate_service.cc
diff --git a/chrome/browser/translate/translate_service.cc b/chrome/browser/translate/translate_service.cc
index 03ac7a719c1bc21109b51b9972ff124af8cbba4c..c6d36638d4afa0ca6d7decdf5615e47edac6e52f 100644
--- a/chrome/browser/translate/translate_service.cc
+++ b/chrome/browser/translate/translate_service.cc
@@ -67,6 +67,7 @@ void TranslateService::Shutdown(bool cleanup_pending_fetcher) {
void TranslateService::InitializeForTesting() {
Takashi Toyoshima 2015/07/14 12:06:22 This function is not called for browser tests. So
if (!g_translate_service) {
TranslateService::Initialize();
+ translate::TranslateManager::SetIgnoreMissingKeyForTesting(true);
} else {
translate::TranslateDownloadManager::GetInstance()->ResetForTesting();
g_translate_service->OnResourceRequestsAllowed();
« no previous file with comments | « no previous file | components/translate/core/browser/translate_browser_metrics.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698