Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4115)

Unified Diff: chrome/browser/download/download_file.cc

Issue 7618048: Move the core download files to content. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/download/download_file.cc
===================================================================
--- chrome/browser/download/download_file.cc (revision 96793)
+++ chrome/browser/download/download_file.cc (working copy)
@@ -1,52 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/download/download_file.h"
-
-#include <string>
-
-#include "base/file_util.h"
-#include "base/stringprintf.h"
-#include "chrome/browser/download/download_create_info.h"
-#include "chrome/browser/download/download_manager.h"
-#include "chrome/browser/download/download_util.h"
-#include "content/browser/browser_thread.h"
-
-DownloadFile::DownloadFile(const DownloadCreateInfo* info,
- DownloadManager* download_manager)
- : BaseFile(info->save_info.file_path,
- info->url(),
- info->referrer_url,
- info->received_bytes,
- info->save_info.file_stream),
- id_(info->download_id),
- request_handle_(info->request_handle),
- download_manager_(download_manager) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
-}
-
-DownloadFile::~DownloadFile() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
-}
-
-void DownloadFile::CancelDownloadRequest() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
- request_handle_.CancelRequest();
-}
-
-DownloadManager* DownloadFile::GetDownloadManager() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
- return download_manager_.get();
-}
-
-std::string DownloadFile::DebugString() const {
- return base::StringPrintf("{"
- " id_ = " "%d"
- " request_handle = %s"
- " Base File = %s"
- " }",
- id_,
- request_handle_.DebugString().c_str(),
- BaseFile::DebugString().c_str());
-}

Powered by Google App Engine
This is Rietveld 408576698