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

Unified Diff: chrome/browser/automation/automation_provider_observers.h

Issue 2559001: Measure loading time of several tabs. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Revert michaeln's revert due to mac linker error Created 10 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/automation/automation_provider_observers.h
diff --git a/chrome/browser/automation/automation_provider_observers.h b/chrome/browser/automation/automation_provider_observers.h
index 6481005412f376f41c54b79da178ff76b419d493..6bf6a2600938922ecd27b50116ab388bf6e465c8 100644
--- a/chrome/browser/automation/automation_provider_observers.h
+++ b/chrome/browser/automation/automation_provider_observers.h
@@ -36,7 +36,18 @@ class InitialLoadObserver : public NotificationObserver {
const NotificationSource& source,
const NotificationDetails& details);
+ // Caller owns the return value and is responsible for deleting it.
+ // Example return value:
+ // {'tabs': [{'start_time_ms': 1, 'stop_time_ms': 2.5},
+ // {'start_time_ms': 0.5, 'stop_time_ms': 3}]}
+ // stop_time_ms values may be null if WaitForInitialLoads has not finished.
+ // Only includes entries for the |tab_count| tabs we are monitoring.
+ // There is no defined ordering of the return value.
+ DictionaryValue* GetTimingInformation() const;
+
private:
+ class TabTime;
+ typedef std::map<uintptr_t, TabTime> TabTimeMap;
typedef std::set<uintptr_t> TabSet;
void ConditionMet();
@@ -45,7 +56,8 @@ class InitialLoadObserver : public NotificationObserver {
AutomationProvider* automation_;
size_t outstanding_tab_count_;
- TabSet loading_tabs_;
+ base::TimeTicks init_time_;
+ TabTimeMap loading_tabs_;
TabSet finished_tabs_;
DISALLOW_COPY_AND_ASSIGN(InitialLoadObserver);
« no previous file with comments | « chrome/browser/automation/automation_provider.cc ('k') | chrome/browser/automation/automation_provider_observers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698