summaryrefslogtreecommitdiffstats
path: root/content/browser/download/drag_download_file.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-26 23:23:55 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-26 23:23:55 +0000
commit3586962cf6d542d53a342fb4823b36b09ba71544 (patch)
tree5463757709af4eb068c00850f91ba78c14110fa0 /content/browser/download/drag_download_file.cc
parent6e268e024c7a5f96f6f269f0e438490ef6c73b53 (diff)
downloadchromium_src-3586962cf6d542d53a342fb4823b36b09ba71544.zip
chromium_src-3586962cf6d542d53a342fb4823b36b09ba71544.tar.gz
chromium_src-3586962cf6d542d53a342fb4823b36b09ba71544.tar.bz2
Move download code to the content namespace.
Review URL: https://codereview.chromium.org/11320016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164439 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/download/drag_download_file.cc')
-rw-r--r--content/browser/download/drag_download_file.cc21
1 files changed, 8 insertions, 13 deletions
diff --git a/content/browser/download/drag_download_file.cc b/content/browser/download/drag_download_file.cc
index 323a69a..2194e7b 100644
--- a/content/browser/download/drag_download_file.cc
+++ b/content/browser/download/drag_download_file.cc
@@ -16,18 +16,13 @@
#include "content/public/browser/download_url_parameters.h"
#include "net/base/file_stream.h"
-using content::BrowserContext;
-using content::BrowserThread;
-using content::DownloadItem;
-using content::DownloadManager;
-using content::DownloadUrlParameters;
-using content::WebContents;
+namespace content {
DragDownloadFile::DragDownloadFile(
const FilePath& file_name_or_path,
scoped_ptr<net::FileStream> file_stream,
const GURL& url,
- const content::Referrer& referrer,
+ const Referrer& referrer,
const std::string& referrer_encoding,
WebContents* web_contents)
: file_stream_(file_stream.Pass()),
@@ -133,13 +128,11 @@ void DragDownloadFile::InitiateDownload() {
download_manager_observer_added_ = true;
download_manager_->AddObserver(this);
- scoped_ptr<content::DownloadSaveInfo> save_info(
- new content::DownloadSaveInfo());
+ scoped_ptr<DownloadSaveInfo> save_info(new DownloadSaveInfo());
save_info->file_path = file_path_;
save_info->file_stream = file_stream_.Pass(); // Nulls file_stream_
- download_stats::RecordDownloadSource(
- download_stats::INITIATED_BY_DRAG_N_DROP);
+ RecordDownloadSource(INITIATED_BY_DRAG_N_DROP);
scoped_ptr<DownloadUrlParameters> params(
DownloadUrlParameters::FromWebContents(
web_contents_, url_, save_info.Pass()));
@@ -199,7 +192,7 @@ void DragDownloadFile::ModelChanged(DownloadManager* manager) {
}
}
-void DragDownloadFile::OnDownloadUpdated(content::DownloadItem* download) {
+void DragDownloadFile::OnDownloadUpdated(DownloadItem* download) {
AssertCurrentlyOnUIThread();
if (download->IsCancelled()) {
RemoveObservers();
@@ -216,7 +209,7 @@ void DragDownloadFile::OnDownloadUpdated(content::DownloadItem* download) {
// OnDownloadDestroyed is only called if OnDownloadUpdated() does not detect
// completion or cancellation (in which cases it removes this observer).
// TODO(benjhayden): Try to change this to NOTREACHED()?
-void DragDownloadFile::OnDownloadDestroyed(content::DownloadItem* download) {
+void DragDownloadFile::OnDownloadDestroyed(DownloadItem* download) {
AssertCurrentlyOnUIThread();
RemoveObservers();
DownloadCompleted(false);
@@ -255,3 +248,5 @@ void DragDownloadFile::QuitNestedMessageLoop() {
}
}
#endif
+
+} // namespace content