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

Unified Diff: extensions/browser/load_monitoring_extension_host_queue.h

Issue 995983002: Make LoadMonitoringExtensionHostQueue remove itself as an ExtensionHost observer at the correct tim… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: roll back some stuff Created 5 years, 9 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: extensions/browser/load_monitoring_extension_host_queue.h
diff --git a/extensions/browser/load_monitoring_extension_host_queue.h b/extensions/browser/load_monitoring_extension_host_queue.h
index cef3242138a2dc50278618f38a958a66d1f20e18..6876399bd89a9d53f9e7f30474a6e88f540130f6 100644
--- a/extensions/browser/load_monitoring_extension_host_queue.h
+++ b/extensions/browser/load_monitoring_extension_host_queue.h
@@ -29,7 +29,7 @@ class LoadMonitoringExtensionHostQueue
// monitoring has finished (timeout has elapsed and UMA is logged).
using FinishedCallback = base::Callback<void(size_t, // num_queued
size_t, // max_loaded
- size_t, // max_in_queue
+ size_t, // max_awaiting_loading
size_t // max_active_loading
)>;
LoadMonitoringExtensionHostQueue(scoped_ptr<ExtensionHostQueue> delegate,
@@ -72,9 +72,6 @@ class LoadMonitoringExtensionHostQueue
void StartMonitoringHost(const DeferredStartRenderHost* host);
void FinishMonitoringHost(const DeferredStartRenderHost* host);
- // Removes |host| from the internal |in_queue_| tracking.
- void RemoveFromQueue(const DeferredStartRenderHost* host);
-
// Called when monitoring should finish. Metrics are recorded, and from this
// point on no monitoring will take place.
void FinishMonitoring();
@@ -89,8 +86,8 @@ class LoadMonitoringExtensionHostQueue
// A callback to run when monitoring has finished. Intended for testing.
FinishedCallback finished_callback_;
- // The hosts which are in the delegate's queue.
- std::set<DeferredStartRenderHost*> in_queue_;
+ // The hosts which are waiting to start loading.
+ std::set<const DeferredStartRenderHost*> awaiting_loading_;
// The hosts which are currently loading.
std::set<const DeferredStartRenderHost*> active_loading_;
@@ -102,8 +99,8 @@ class LoadMonitoringExtensionHostQueue
size_t num_queued_;
// The total number of hosts that started loading.
size_t num_loaded_;
- // The maximum number of hosts in the queue at any time.
- size_t max_in_queue_;
+ // The maximum number of hosts waiting to load at the same time.
+ size_t max_awaiting_loading_;
// The maximum number of hosts that were loading at the same time.
size_t max_active_loading_;
« no previous file with comments | « extensions/browser/lazy_background_task_queue.cc ('k') | extensions/browser/load_monitoring_extension_host_queue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698