diff options
author | johnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-01 20:54:58 +0000 |
---|---|---|
committer | johnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-01 20:54:58 +0000 |
commit | 7d7696c51fcba9470ecddf095d8a6013f538fe3b (patch) | |
tree | d419d54f96947afd29f977e11856a52661991dad /chrome/browser/profile.cc | |
parent | a37ae1dd538a8cc96d749cf580646bf7b00bffd6 (diff) | |
download | chromium_src-7d7696c51fcba9470ecddf095d8a6013f538fe3b.zip chromium_src-7d7696c51fcba9470ecddf095d8a6013f538fe3b.tar.gz chromium_src-7d7696c51fcba9470ecddf095d8a6013f538fe3b.tar.bz2 |
Keep incognito notification preferences separate from regular ones, and don't persist them permanently.
BUG=none
TEST=use notifications in incognito
Review URL: http://codereview.chromium.org/455004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33476 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/profile.cc')
-rw-r--r-- | chrome/browser/profile.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc index 2db89ac..7a7c89a 100644 --- a/chrome/browser/profile.cc +++ b/chrome/browser/profile.cc @@ -429,7 +429,11 @@ class OffTheRecordProfileImpl : public Profile, } virtual DesktopNotificationService* GetDesktopNotificationService() { - return profile_->GetDesktopNotificationService(); + if (!desktop_notification_service_.get()) { + desktop_notification_service_.reset(new DesktopNotificationService( + this, g_browser_process->notification_ui_manager())); + } + return desktop_notification_service_.get(); } virtual ProfileSyncService* GetProfileSyncService() { @@ -523,6 +527,9 @@ class OffTheRecordProfileImpl : public Profile, // The download manager that only stores downloaded items in memory. scoped_refptr<DownloadManager> download_manager_; + // Use a separate desktop notification service for OTR. + scoped_ptr<DesktopNotificationService> desktop_notification_service_; + // Use a special WebKit context for OTR browsing. scoped_refptr<WebKitContext> webkit_context_; |