summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/drive/download_handler_unittest.cc
diff options
context:
space:
mode:
authorcaio.de.oliveira.filho@intel.com <caio.de.oliveira.filho@intel.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-29 02:18:06 +0000
committercaio.de.oliveira.filho@intel.com <caio.de.oliveira.filho@intel.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-29 02:18:06 +0000
commiteba4a4d2ae2cd9ac349c3a841779b4521b7d9bd5 (patch)
tree5d56d4858c931b1fb2d37687c205f0a8e0f40854 /chrome/browser/chromeos/drive/download_handler_unittest.cc
parentdc1a7fed64f98bde211a369187900d38f48dba3d (diff)
downloadchromium_src-eba4a4d2ae2cd9ac349c3a841779b4521b7d9bd5.zip
chromium_src-eba4a4d2ae2cd9ac349c3a841779b4521b7d9bd5.tar.gz
chromium_src-eba4a4d2ae2cd9ac349c3a841779b4521b7d9bd5.tar.bz2
BrowserContext should simply own DownloadManager
This patch changes BrowserContext so it store a DownloadManager directly (as UserData), instead of storing a refptr to it. Client code (mostly tests) that used refptrs was changed to use either raw pointers or to use scoped_ptr/ScopedVector in case of DownloadManagers created by it. The Bind() in DownloadManagerImpl::CheckForFileRemoval() is now using a weak pointer to itself. BUG=237871 TEST=content_unittests and {unit,browser}_tests with *Download* and *SavePage* Review URL: https://chromiumcodereview.appspot.com/15701007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202743 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/drive/download_handler_unittest.cc')
-rw-r--r--chrome/browser/chromeos/drive/download_handler_unittest.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome/browser/chromeos/drive/download_handler_unittest.cc b/chrome/browser/chromeos/drive/download_handler_unittest.cc
index 5cba3ec..5fd48d3 100644
--- a/chrome/browser/chromeos/drive/download_handler_unittest.cc
+++ b/chrome/browser/chromeos/drive/download_handler_unittest.cc
@@ -60,7 +60,7 @@ class DownloadHandlerTest : public testing::Test {
file_write_helper_.reset(new FileWriteHelper(&file_system_));
download_handler_.reset(
new DownloadHandler(file_write_helper_.get(), &file_system_));
- download_handler_->Initialize(download_manager_, temp_dir_.path());
+ download_handler_->Initialize(download_manager_.get(), temp_dir_.path());
}
virtual void TearDown() OVERRIDE {
@@ -70,7 +70,7 @@ class DownloadHandlerTest : public testing::Test {
base::ScopedTempDir temp_dir_;
base::MessageLoopForUI message_loop_;
content::TestBrowserThread ui_thread_;
- scoped_refptr<content::MockDownloadManager> download_manager_;
+ scoped_ptr<content::MockDownloadManager> download_manager_;
MockFileSystem file_system_;
scoped_ptr<FileWriteHelper> file_write_helper_;
scoped_ptr<DownloadHandler> download_handler_;