diff options
Diffstat (limited to 'chrome/browser/profile.cc')
-rw-r--r-- | chrome/browser/profile.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc index bbfd60d..a2fbff3 100644 --- a/chrome/browser/profile.cc +++ b/chrome/browser/profile.cc @@ -16,6 +16,7 @@ #include "chrome/browser/appcache/chrome_appcache_service.h" #include "chrome/browser/autocomplete/autocomplete_classifier.h" #include "chrome/browser/autofill/personal_data_manager.h" +#include "chrome/browser/background_contents_service.h" #include "chrome/browser/bookmarks/bookmark_model.h" #include "chrome/browser/browser_list.h" #include "chrome/browser/browser_prefs.h" @@ -309,6 +310,8 @@ class OffTheRecordProfileImpl : public Profile, // (cookies, downloads...). registrar_.Add(this, NotificationType::BROWSER_CLOSED, NotificationService::AllSources()); + background_contents_service_.reset( + new BackgroundContentsService(this, CommandLine::ForCurrentProcess())); } virtual ~OffTheRecordProfileImpl() { @@ -366,6 +369,10 @@ class OffTheRecordProfileImpl : public Profile, return GetOriginalProfile()->GetExtensionsService(); } + virtual BackgroundContentsService* GetBackgroundContentsService() { + return background_contents_service_.get(); + } + virtual UserScriptMaster* GetUserScriptMaster() { return GetOriginalProfile()->GetUserScriptMaster(); } @@ -721,6 +728,9 @@ class OffTheRecordProfileImpl : public Profile, FilePath last_selected_directory_; + // Tracks all BackgroundContents running under this profile. + scoped_ptr<BackgroundContentsService> background_contents_service_; + DISALLOW_COPY_AND_ASSIGN(OffTheRecordProfileImpl); }; @@ -808,6 +818,9 @@ ProfileImpl::ProfileImpl(const FilePath& path) pinned_tab_service_.reset(new PinnedTabService(this)); + background_contents_service_.reset( + new BackgroundContentsService(this, CommandLine::ForCurrentProcess())); + // Log the profile size after a reasonable startup delay. ChromeThread::PostDelayedTask(ChromeThread::FILE, FROM_HERE, new ProfileSizeTask(path_), 112000); @@ -1049,6 +1062,10 @@ ExtensionsService* ProfileImpl::GetExtensionsService() { return extensions_service_.get(); } +BackgroundContentsService* ProfileImpl::GetBackgroundContentsService() { + return background_contents_service_.get(); +} + UserScriptMaster* ProfileImpl::GetUserScriptMaster() { return user_script_master_.get(); } |