summaryrefslogtreecommitdiffstats
path: root/chrome/test/ui_test_utils.cc
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-16 23:39:42 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-16 23:39:42 +0000
commitd3b129003402bb0f37d0f22803efa1960bee90a3 (patch)
tree3f6d62d040162549f699df4f67ac6368b4f6edf4 /chrome/test/ui_test_utils.cc
parenteb997422bde4133da7db0e1e3ff82d18890de218 (diff)
downloadchromium_src-d3b129003402bb0f37d0f22803efa1960bee90a3.zip
chromium_src-d3b129003402bb0f37d0f22803efa1960bee90a3.tar.gz
chromium_src-d3b129003402bb0f37d0f22803efa1960bee90a3.tar.bz2
Regression fix: Downloads page in Incognito mode works fine now.
Additionally, it fixes another ancient bug that prevented downloads search from working in Incognito mode. The design of DownloadHistory is also nicer now, with no dependencies on DownloadManager. TEST=see bug BUG=51955 Review URL: http://codereview.chromium.org/3112011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56266 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/ui_test_utils.cc')
-rw-r--r--chrome/test/ui_test_utils.cc12
1 files changed, 3 insertions, 9 deletions
diff --git a/chrome/test/ui_test_utils.cc b/chrome/test/ui_test_utils.cc
index cdd6087..3d36b6e 100644
--- a/chrome/test/ui_test_utils.cc
+++ b/chrome/test/ui_test_utils.cc
@@ -168,7 +168,7 @@ class DownloadsCompleteObserver : public DownloadManager::Observer,
download_manager_->RemoveObserver(this);
// waiting_ will have been set if not all downloads were complete on first
- // pass below in OnSearchDownloadsComplete().
+ // pass below in ModelChanged().
if (waiting_)
MessageLoopForUI::current()->Quit();
return true;
@@ -186,14 +186,9 @@ class DownloadsCompleteObserver : public DownloadManager::Observer,
// DownloadManager::Observer
virtual void ModelChanged() {
- download_manager_->download_history()->Search(
- string16(),
- NewCallback(this,
- &DownloadsCompleteObserver::OnSearchDownloadsComplete));
- }
+ downloads_.clear();
+ download_manager_->SearchDownloads(string16(), &downloads_);
- void OnSearchDownloadsComplete(std::vector<DownloadItem*> downloads) {
- downloads_ = downloads;
if (CheckAllDownloadsComplete())
return;
@@ -203,7 +198,6 @@ class DownloadsCompleteObserver : public DownloadManager::Observer,
}
}
-
private:
// The observed download manager.
DownloadManager* download_manager_;