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

Side by Side Diff: chrome/browser/download/download_file.h

Issue 6932046: Added DownloadProcessHandle class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: download_process_handle Created 9 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_FILE_H_ 5 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_FILE_H_
6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_FILE_H_ 6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_FILE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "chrome/browser/download/base_file.h" 13 #include "chrome/browser/download/base_file.h"
14 #include "chrome/browser/download/download_process_handle.h"
14 #include "chrome/browser/download/download_types.h" 15 #include "chrome/browser/download/download_types.h"
15 16
16 struct DownloadCreateInfo; 17 struct DownloadCreateInfo;
17 class DownloadManager; 18 class DownloadManager;
18 class ResourceDispatcherHost; 19 class ResourceDispatcherHost;
19 20
20 // These objects live exclusively on the download thread and handle the writing 21 // These objects live exclusively on the download thread and handle the writing
21 // operations for one download. These objects live only for the duration that 22 // operations for one download. These objects live only for the duration that
22 // the download is 'in progress': once the download has been completed or 23 // the download is 'in progress': once the download has been completed or
23 // cancelled, the DownloadFile is destroyed. 24 // cancelled, the DownloadFile is destroyed.
(...skipping 10 matching lines...) Expand all
34 DownloadManager* GetDownloadManager(); 35 DownloadManager* GetDownloadManager();
35 36
36 virtual std::string DebugString() const; 37 virtual std::string DebugString() const;
37 38
38 private: 39 private:
39 // The unique identifier for this download, assigned at creation by 40 // The unique identifier for this download, assigned at creation by
40 // the DownloadFileManager for its internal record keeping. 41 // the DownloadFileManager for its internal record keeping.
41 int id_; 42 int id_;
42 43
43 // IDs for looking up the tab we are associated with. 44 // IDs for looking up the tab we are associated with.
44 int child_id_; 45 DownloadProcessHandle process_handle_;
45
46 // Handle for informing the ResourceDispatcherHost of a UI based cancel.
47 int request_id_;
48 46
49 // DownloadManager this download belongs to. 47 // DownloadManager this download belongs to.
50 scoped_refptr<DownloadManager> download_manager_; 48 scoped_refptr<DownloadManager> download_manager_;
51 49
52 DISALLOW_COPY_AND_ASSIGN(DownloadFile); 50 DISALLOW_COPY_AND_ASSIGN(DownloadFile);
53 }; 51 };
54 52
55 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_FILE_H_ 53 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_FILE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/download/download_file.cc » ('j') | chrome/browser/download/download_file_manager.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698