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

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: Two comment improvements 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
« no previous file with comments | « no previous file | components/offline_pages/background/request_coordinator.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.h
diff --git a/components/offline_pages/background/request_coordinator.h b/components/offline_pages/background/request_coordinator.h
index 537e5a85df475cd6b747f28e5facdab6ca6170a1..64e13cd256bc1f9f00ef1657f95d6dd6a179ce49 100644
--- a/components/offline_pages/background/request_coordinator.h
+++ b/components/offline_pages/background/request_coordinator.h
@@ -169,6 +169,26 @@ class RequestCoordinator : public KeyedService,
}
private:
+ // Immediate start attempt status code for UMA.
+ // For any changes, also update corresponding histogram in histograms.xml.
+ enum OfflinerImmediateStartStatus {
+ // 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 +225,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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698