summaryrefslogtreecommitdiffstats
path: root/chrome/browser/profile.h
diff options
context:
space:
mode:
authordarin@google.com <darin@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-03 18:18:14 +0000
committerdarin@google.com <darin@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-03 18:18:14 +0000
commit2d31666a58e746b7a1d415c99e5f68ad9256d236 (patch)
tree144c99d4b80df0f0f9a3ded83f9d21a8b36f17cc /chrome/browser/profile.h
parent90d6958fe2374a00d3c8583cf4d3b8a509ae8e90 (diff)
downloadchromium_src-2d31666a58e746b7a1d415c99e5f68ad9256d236.zip
chromium_src-2d31666a58e746b7a1d415c99e5f68ad9256d236.tar.gz
chromium_src-2d31666a58e746b7a1d415c99e5f68ad9256d236.tar.bz2
Minor cleanup to OneShotTimer and RepeatingTimer: moves more of the member variables into the Task subclass.
Also included in this change: deprecate MessageLoop::timer_manager(), and change consumers over to use OneShotTimer or RepeatingTimer. R=beng BUG=1346553 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1684 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/profile.h')
-rw-r--r--chrome/browser/profile.h30
1 files changed, 6 insertions, 24 deletions
diff --git a/chrome/browser/profile.h b/chrome/browser/profile.h
index e4057c6..238ce41 100644
--- a/chrome/browser/profile.h
+++ b/chrome/browser/profile.h
@@ -14,7 +14,7 @@
#include "base/ref_counted.h"
#include "base/scoped_ptr.h"
#include "base/task.h"
-#include "base/time.h"
+#include "base/timer.h"
#ifdef CHROME_PERSONALIZATION
#include "chrome/personalization/personalization.h"
#endif
@@ -33,10 +33,6 @@ class URLRequestContext;
class VisitedLinkMaster;
class WebDataService;
-namespace base {
-class Timer;
-}
-
class Profile {
public:
@@ -291,23 +287,6 @@ class ProfileImpl : public Profile {
private:
class RequestContext;
- // TODO(sky): replace this with a generic invokeLater that doesn't require
- // arg to be ref counted.
- class CreateSessionServiceTask : public Task {
- public:
- explicit CreateSessionServiceTask(ProfileImpl* profile)
- : profile_(profile) {
- }
- void Run() {
- profile_->GetSessionService();
- }
-
- private:
- ProfileImpl* profile_;
-
- DISALLOW_EVIL_CONSTRUCTORS(CreateSessionServiceTask);
- };
-
friend class Profile;
ProfileImpl(const std::wstring& path);
@@ -316,6 +295,10 @@ class ProfileImpl : public Profile {
std::wstring GetPrefFilePath();
void StopCreateSessionServiceTimer();
+
+ void EnsureSessionServiceCreated() {
+ GetSessionService();
+ }
std::wstring path_;
bool off_the_record_;
@@ -343,8 +326,7 @@ class ProfileImpl : public Profile {
ProfileControllerSet controllers_;
- base::Timer* create_session_service_timer_;
- CreateSessionServiceTask create_session_service_task_;
+ base::OneShotTimer<ProfileImpl> create_session_service_timer_;
scoped_ptr<OffTheRecordProfileImpl> off_the_record_profile_;