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

Unified Diff: chrome/browser/safe_browsing/protocol_manager.cc

Issue 356843002: [Android] Disable connect type check for unit test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: adjust the order of debugging fields Created 6 years, 6 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
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 57d02b416c5bc18cf3b6202a2a57c8604329b0a6..57896b7c4b58c03a0dba5b3080f3abedbba85307 100644
--- a/chrome/browser/safe_browsing/protocol_manager.cc
+++ b/chrome/browser/safe_browsing/protocol_manager.cc
@@ -122,6 +122,9 @@ SafeBrowsingProtocolManager::SafeBrowsingProtocolManager(
url_prefix_(config.url_prefix),
backup_update_reason_(BACKUP_UPDATE_REASON_MAX),
disable_auto_update_(config.disable_auto_update),
+#if defined(OS_ANDROID)
+ disable_connection_check_(config.disable_connection_check),
+#endif
url_fetcher_id_(0),
app_in_foreground_(true) {
DCHECK(!url_prefix_.empty());
@@ -198,11 +201,13 @@ void SafeBrowsingProtocolManager::GetNextUpdate() {
return;
#if defined(OS_ANDROID)
- net::NetworkChangeNotifier::ConnectionType type =
- net::NetworkChangeNotifier::GetConnectionType();
- if (type != net::NetworkChangeNotifier::CONNECTION_WIFI) {
- ScheduleNextUpdate(false /* no back off */);
- return;
+ if (!disable_connection_check_) {
+ net::NetworkChangeNotifier::ConnectionType type =
+ net::NetworkChangeNotifier::GetConnectionType();
+ if (type != net::NetworkChangeNotifier::CONNECTION_WIFI) {
+ ScheduleNextUpdate(false /* no back off */);
+ return;
+ }
}
#endif
« no previous file with comments | « chrome/browser/safe_browsing/protocol_manager.h ('k') | chrome/browser/safe_browsing/protocol_manager_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698