| Index: components/translate/core/browser/translate_manager.cc
|
| diff --git a/components/translate/core/browser/translate_manager.cc b/components/translate/core/browser/translate_manager.cc
|
| index 2524c228d532dedb9bb91dba669d801fa0dd52e7..689b70abadafdd04cda61e97e886500dfc546990 100644
|
| --- a/components/translate/core/browser/translate_manager.cc
|
| +++ b/components/translate/core/browser/translate_manager.cc
|
| @@ -31,6 +31,7 @@
|
| #include "components/translate/core/common/translate_switches.h"
|
| #include "components/translate/core/common/translate_util.h"
|
| #include "google_apis/google_api_keys.h"
|
| +#include "net/base/network_change_notifier.h"
|
| #include "net/base/url_util.h"
|
| #include "net/http/http_status_code.h"
|
|
|
| @@ -89,6 +90,11 @@ void TranslateManager::InitiateTranslation(const std::string& page_lang) {
|
| return;
|
| }
|
|
|
| + // Also, skip if the connection is currently offline - initiation doesn't make
|
| + // sense there, either.
|
| + if (net::NetworkChangeNotifier::IsOffline())
|
| + return;
|
| +
|
| if (!ignore_missing_key_for_testing_ &&
|
| !::google_apis::HasKeysConfigured()) {
|
| // Without an API key, translate won't work, so don't offer to translate
|
|
|