diff options
author | mbelshe@google.com <mbelshe@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-14 22:17:25 +0000 |
---|---|---|
committer | mbelshe@google.com <mbelshe@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-14 22:17:25 +0000 |
commit | ae7ca1b9b87f64b8c798cc9db11cc568e9ae421e (patch) | |
tree | 2028b70d318110ec2e44760859bc9bb16c4d3d09 /chrome/browser/profile_manager.cc | |
parent | a4bcf7d648a9dcbc75b989801f8126b080d55ba0 (diff) | |
download | chromium_src-ae7ca1b9b87f64b8c798cc9db11cc568e9ae421e.zip chromium_src-ae7ca1b9b87f64b8c798cc9db11cc568e9ae421e.tar.gz chromium_src-ae7ca1b9b87f64b8c798cc9db11cc568e9ae421e.tar.bz2 |
Review URL: http://codereview.chromium.org/10958
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5509 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/profile_manager.cc')
-rw-r--r-- | chrome/browser/profile_manager.cc | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/chrome/browser/profile_manager.cc b/chrome/browser/profile_manager.cc index 23ad108..d8c5099 100644 --- a/chrome/browser/profile_manager.cc +++ b/chrome/browser/profile_manager.cc @@ -21,8 +21,6 @@ #include "chrome/common/logging_chrome.h" #include "chrome/common/pref_names.h" #include "chrome/common/pref_service.h" -#include "net/url_request/url_request_job.h" -#include "net/url_request/url_request_job_tracker.h" #include "generated_resources.h" @@ -41,16 +39,9 @@ void ProfileManager::ShutdownSessionServices() { } ProfileManager::ProfileManager() { - base::SystemMonitor* monitor = base::SystemMonitor::Get(); - if (monitor) - monitor->AddObserver(this); } ProfileManager::~ProfileManager() { - base::SystemMonitor* monitor = base::SystemMonitor::Get(); - if (monitor) - monitor->RemoveObserver(this); - // Destroy all profiles that we're keeping track of. for (ProfileVector::const_iterator iter = profiles_.begin(); iter != profiles_.end(); ++iter) { @@ -224,47 +215,6 @@ Profile* ProfileManager::GetProfileByID(const std::wstring& id) const { return NULL; } -void ProfileManager::OnSuspend(base::SystemMonitor* monitor) { - DCHECK(CalledOnValidThread()); - - ProfileManager::const_iterator it = begin(); - while(it != end()) { - g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE, - NewRunnableFunction(&ProfileManager::SuspendProfile, *it)); - it++; - } -} - -void ProfileManager::OnResume(base::SystemMonitor* monitor) { - DCHECK(CalledOnValidThread()); - ProfileManager::const_iterator it = begin(); - while (it != end()) { - g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE, - NewRunnableFunction(&ProfileManager::ResumeProfile, *it)); - it++; - } -} - -void ProfileManager::SuspendProfile(Profile* profile) { - DCHECK(profile); - DCHECK(MessageLoop::current() == - ChromeThread::GetMessageLoop(ChromeThread::IO)); - - URLRequestJobTracker::JobIterator it = g_url_request_job_tracker.begin(); - for (;it != g_url_request_job_tracker.end(); ++it) - (*it)->Kill(); - - profile->GetRequestContext()->http_transaction_factory()->Suspend(true); -} - -void ProfileManager::ResumeProfile(Profile* profile) { - DCHECK(profile); - DCHECK(MessageLoop::current() == - ChromeThread::GetMessageLoop(ChromeThread::IO)); - profile->GetRequestContext()->http_transaction_factory()->Suspend(false); -} - - // static bool ProfileManager::IsProfile(const std::wstring& path) { |