| Index: chrome/browser/safe_browsing/protocol_manager.cc
|
| diff --git a/chrome/browser/safe_browsing/protocol_manager.cc b/chrome/browser/safe_browsing/protocol_manager.cc
|
| index 78d96ca102abcf7cb20ffa97c408eec0a222f946..2a856ec031bca0288dd25e00127e7b535ca38092 100644
|
| --- a/chrome/browser/safe_browsing/protocol_manager.cc
|
| +++ b/chrome/browser/safe_browsing/protocol_manager.cc
|
| @@ -26,6 +26,10 @@
|
| #include "net/url_request/url_request_context_getter.h"
|
| #include "net/url_request/url_request_status.h"
|
|
|
| +#if defined(OS_ANDROID)
|
| +#include "net/base/network_change_notifier.h"
|
| +#endif
|
| +
|
| using base::Time;
|
| using base::TimeDelta;
|
|
|
| @@ -197,8 +201,19 @@ void SafeBrowsingProtocolManager::GetFullHash(
|
|
|
| void SafeBrowsingProtocolManager::GetNextUpdate() {
|
| DCHECK(CalledOnValidThread());
|
| - if (!request_.get() && request_type_ == NO_REQUEST)
|
| - IssueUpdateRequest();
|
| + if (request_.get() || request_type_ != NO_REQUEST)
|
| + return;
|
| +
|
| +#if defined(OS_ANDROID)
|
| + net::NetworkChangeNotifier::ConnectionType type =
|
| + net::NetworkChangeNotifier::GetConnectionType();
|
| + if (type != net::NetworkChangeNotifier::CONNECTION_WIFI) {
|
| + ScheduleNextUpdate(false /* no back off */);
|
| + return;
|
| + }
|
| +#endif
|
| +
|
| + IssueUpdateRequest();
|
| }
|
|
|
| // net::URLFetcherDelegate implementation ----------------------------------
|
|
|