summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorglen@chromium.org <glen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-17 15:50:31 +0000
committerglen@chromium.org <glen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-17 15:50:31 +0000
commit7ee3f099cdce770029d0eea81bbd36bd56a279ec (patch)
treebd70707d205dcf006c4a6b3e7e703db5d065f628 /chrome/browser
parent13b92160af210543479551c8a80af26c6d8d9e97 (diff)
downloadchromium_src-7ee3f099cdce770029d0eea81bbd36bd56a279ec.zip
chromium_src-7ee3f099cdce770029d0eea81bbd36bd56a279ec.tar.gz
chromium_src-7ee3f099cdce770029d0eea81bbd36bd56a279ec.tar.bz2
History observer was observing the wrong profile in incognito mode.
BUG=9984 TEST=Open two history tabs, one inside an incognito window. Delete a day's history in each and observe that the changes are reflected in the other. Review URL: http://codereview.chromium.org/67250 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13937 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/dom_ui/history_ui.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome/browser/dom_ui/history_ui.cc b/chrome/browser/dom_ui/history_ui.cc
index 5e299b6..b9cba34 100644
--- a/chrome/browser/dom_ui/history_ui.cc
+++ b/chrome/browser/dom_ui/history_ui.cc
@@ -115,7 +115,8 @@ BrowsingHistoryHandler::BrowsingHistoryHandler(DOMUI* dom_ui)
// Get notifications when history is cleared.
NotificationService* service = NotificationService::current();
service->AddObserver(this, NotificationType::HISTORY_URLS_DELETED,
- Source<Profile>(dom_ui_->GetProfile()));
+ Source<Profile>(
+ dom_ui_->GetProfile()->GetOriginalProfile()));
}
BrowsingHistoryHandler::~BrowsingHistoryHandler() {
@@ -123,7 +124,8 @@ BrowsingHistoryHandler::~BrowsingHistoryHandler() {
NotificationService* service = NotificationService::current();
service->RemoveObserver(this, NotificationType::HISTORY_URLS_DELETED,
- Source<Profile>(dom_ui_->GetProfile()));
+ Source<Profile>(
+ dom_ui_->GetProfile()->GetOriginalProfile()));
if (remover_.get())
remover_->RemoveObserver(this);