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

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

Issue 2388303007: [Offline Pages] Adds UMA for result of attempts to immediately start background loading. (Closed)
Patch Set: Addressed mpearson feedback Created 4 years, 2 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: components/offline_pages/background/request_coordinator.h
diff --git a/components/offline_pages/background/request_coordinator.h b/components/offline_pages/background/request_coordinator.h
index 537e5a85df475cd6b747f28e5facdab6ca6170a1..31eee68fce0debea855d1695edcb813210f76e1a 100644
--- a/components/offline_pages/background/request_coordinator.h
+++ b/components/offline_pages/background/request_coordinator.h
@@ -169,6 +169,24 @@ class RequestCoordinator : public KeyedService,
}
private:
+ enum OfflinerImmediateStartStatus {
Mark P 2016/10/06 23:11:36 Can you please add the warning at the top as well?
dougarnett 2016/10/07 00:18:56 Done.
Mark P 2016/10/07 04:44:06 Next time you update this file, can you please upd
+ // Did start processing request.
+ STARTED = 0,
+ // Already busy processing a request.
+ BUSY = 1,
+ // The Offliner did not accept processing the request.
+ NOT_ACCEPTED = 2,
+ // No current network connection.
+ NO_CONNECTION = 3,
+ // Weak network connection (worse than 2G speed)
+ // according to network quality estimator.
+ WEAK_CONNECTION = 4,
+ // Did not start because this is svelte device.
+ NOT_STARTED_ON_SVELTE = 5,
+ // NOTE: insert new values above this line and update histogram enum too.
+ STATUS_COUNT = 6,
+ };
+
// Receives the results of a get from the request queue, and turns that into
// SavePageRequest objects for the caller of GetQueuedRequests.
void GetQueuedRequestsCallback(
@@ -205,6 +223,8 @@ class RequestCoordinator : public KeyedService,
// as to other device conditions).
void StartProcessingIfConnected();
+ OfflinerImmediateStartStatus TryImmediateStart();
+
// Check the request queue, and schedule a task corresponding
// to the least restrictive type of request in the queue.
void ScheduleAsNeeded();
« no previous file with comments | « no previous file | components/offline_pages/background/request_coordinator.cc » ('j') | tools/metrics/histograms/histograms.xml » ('J')

Powered by Google App Engine
This is Rietveld 408576698