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

Unified Diff: components/offline_pages/background/request_coordinator.cc

Issue 2342803003: [Offline Pages] Gates immediate triggering (non scheduled) of background (Closed)
Patch Set: Created 4 years, 3 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/offline_pages/background/request_coordinator_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/offline_pages/background/request_coordinator.cc
diff --git a/components/offline_pages/background/request_coordinator.cc b/components/offline_pages/background/request_coordinator.cc
index 82d39d9f0c3cf28709f303156ca6ff1fdf9fc280..3030e3c95f7320d4ea452b73b81e1257b9400daf 100644
--- a/components/offline_pages/background/request_coordinator.cc
+++ b/components/offline_pages/background/request_coordinator.cc
@@ -11,6 +11,7 @@
#include "base/logging.h"
#include "base/metrics/histogram_macros.h"
#include "base/rand_util.h"
+#include "base/sys_info.h"
#include "base/time/time.h"
#include "components/offline_pages/background/offliner_factory.h"
#include "components/offline_pages/background/offliner_policy.h"
@@ -337,6 +338,9 @@ void RequestCoordinator::StartProcessingIfConnected() {
// Makes sure not already busy processing.
if (is_busy_) return;
+ // Make sure we are not on svelte device to start immediately.
+ if (base::SysInfo::IsLowEndDevice()) return;
+
// Check for network connectivity.
net::NetworkChangeNotifier::ConnectionType connection = GetConnectionType();
« no previous file with comments | « no previous file | components/offline_pages/background/request_coordinator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698