summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sessions/session_service.h
diff options
context:
space:
mode:
authortim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-10 18:13:12 +0000
committertim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-10 18:13:12 +0000
commit70eb8ed90fcea370e567666632ee225d95caee0b (patch)
tree43559a0fd3e85d01daa5225f63ce6a2dd3ad5e5c /chrome/browser/sessions/session_service.h
parent33b7c47777e2b88e6a876cc48a562f03d5dddae4 (diff)
downloadchromium_src-70eb8ed90fcea370e567666632ee225d95caee0b.zip
chromium_src-70eb8ed90fcea370e567666632ee225d95caee0b.tar.gz
chromium_src-70eb8ed90fcea370e567666632ee225d95caee0b.tar.bz2
Add histogram coverage of session service Save() operations, namely the time between successive Save() operations.
BUG=none TEST=about:histograms Review URL: http://codereview.chromium.org/2732005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49420 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sessions/session_service.h')
-rw-r--r--chrome/browser/sessions/session_service.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/chrome/browser/sessions/session_service.h b/chrome/browser/sessions/session_service.h
index 0611842..cfb3a8d 100644
--- a/chrome/browser/sessions/session_service.h
+++ b/chrome/browser/sessions/session_service.h
@@ -9,6 +9,7 @@
#include "base/basictypes.h"
#include "base/callback.h"
+#include "base/time.h"
#include "chrome/browser/browser.h"
#include "chrome/browser/browser_list.h"
#include "chrome/browser/defaults.h"
@@ -169,6 +170,10 @@ class SessionService : public BaseSessionService,
Handle GetCurrentSession(CancelableRequestConsumerBase* consumer,
SessionCallback* callback);
+ // Overridden from BaseSessionService because we want some UMA reporting on
+ // session update activities.
+ virtual void Save();
+
private:
typedef std::map<SessionID::id_type,std::pair<int,int> > IdToRange;
typedef std::map<SessionID::id_type,SessionTab*> IdToSessionTab;
@@ -374,7 +379,10 @@ class SessionService : public BaseSessionService,
return !has_open_trackable_browsers_ &&
(!browser_defaults::kBrowserAliveWithNoWindows ||
BrowserList::size() > 1);
- }
+ }
+
+ // Call when a Save() occurs to record this in UMA stats.
+ void RecordSaveHistogramData();
// Convert back/forward between the Browser and SessionService DB window
// types.
@@ -421,6 +429,9 @@ class SessionService : public BaseSessionService,
// current/previous session.
bool move_on_new_browser_;
+ // Used for reporting frequency of Save() operations.
+ base::TimeTicks last_save_time_;
+
DISALLOW_COPY_AND_ASSIGN(SessionService);
};