summaryrefslogtreecommitdiffstats
path: root/chrome/browser/profile.cc
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.cc
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.cc')
-rw-r--r--chrome/browser/profile.cc16
1 files changed, 4 insertions, 12 deletions
diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc
index 9a64b40..b55a065 100644
--- a/chrome/browser/profile.cc
+++ b/chrome/browser/profile.cc
@@ -551,9 +551,6 @@ ProfileImpl::ProfileImpl(const std::wstring& path)
created_web_data_service_(false),
created_download_manager_(false),
request_context_(NULL),
-#pragma warning(suppress: 4355) // Okay to pass "this" here.
- create_session_service_timer_(NULL),
- create_session_service_task_(this),
start_time_(Time::Now()),
spellchecker_(NULL),
#ifdef CHROME_PERSONALIZATION
@@ -562,9 +559,9 @@ ProfileImpl::ProfileImpl(const std::wstring& path)
shutdown_session_service_(false) {
DCHECK(!path.empty()) << "Using an empty path will attempt to write " <<
"profile files to the root directory!";
- create_session_service_timer_ =
- MessageLoop::current()->timer_manager()->StartTimer(
- kCreateSessionServiceDelayMS, &create_session_service_task_, false);
+ create_session_service_timer_.Start(
+ TimeDelta::FromMilliseconds(kCreateSessionServiceDelayMS), this,
+ &ProfileImpl::EnsureSessionServiceCreated);
}
ProfileImpl::~ProfileImpl() {
@@ -913,12 +910,7 @@ void ProfileImpl::MarkAsCleanShutdown() {
}
void ProfileImpl::StopCreateSessionServiceTimer() {
- if (create_session_service_timer_) {
- MessageLoop::current()->timer_manager()->
- StopTimer(create_session_service_timer_);
- delete create_session_service_timer_;
- create_session_service_timer_ = NULL;
- }
+ create_session_service_timer_.Stop();
}
#ifdef CHROME_PERSONALIZATION