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

Side by Side Diff: content/browser/download/download_manager.h

Issue 8371009: Make passing of DownloadRequestHandle separate from DownloadCreateInfo. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to LKGR. Created 9 years, 1 month 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
« no previous file with comments | « content/browser/download/download_item.cc ('k') | content/browser/download/download_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // The DownloadManager object manages the process of downloading, including 5 // The DownloadManager object manages the process of downloading, including
6 // updates to the history system and providing the information for displaying 6 // updates to the history system and providing the information for displaying
7 // the downloads view in the Destinations tab. There is one DownloadManager per 7 // the downloads view in the Destinations tab. There is one DownloadManager per
8 // active browser context in Chrome. 8 // active browser context in Chrome.
9 // 9 //
10 // Download observers: 10 // Download observers:
(...skipping 28 matching lines...) Expand all
39 #include "base/gtest_prod_util.h" 39 #include "base/gtest_prod_util.h"
40 #include "base/hash_tables.h" 40 #include "base/hash_tables.h"
41 #include "base/memory/ref_counted.h" 41 #include "base/memory/ref_counted.h"
42 #include "base/memory/scoped_ptr.h" 42 #include "base/memory/scoped_ptr.h"
43 #include "base/memory/weak_ptr.h" 43 #include "base/memory/weak_ptr.h"
44 #include "base/observer_list.h" 44 #include "base/observer_list.h"
45 #include "base/synchronization/lock.h" 45 #include "base/synchronization/lock.h"
46 #include "base/time.h" 46 #include "base/time.h"
47 #include "content/browser/browser_thread.h" 47 #include "content/browser/browser_thread.h"
48 #include "content/browser/download/download_item.h" 48 #include "content/browser/download/download_item.h"
49 #include "content/browser/download/download_request_handle.h"
50 #include "content/browser/download/download_status_updater_delegate.h" 49 #include "content/browser/download/download_status_updater_delegate.h"
51 #include "content/browser/download/interrupt_reasons.h" 50 #include "content/browser/download/interrupt_reasons.h"
52 #include "content/common/content_export.h" 51 #include "content/common/content_export.h"
53 #include "net/base/net_errors.h" 52 #include "net/base/net_errors.h"
54 53
55 class DownloadFileManager; 54 class DownloadFileManager;
55 class DownloadRequestHandle;
56 class DownloadStatusUpdater; 56 class DownloadStatusUpdater;
57 class GURL; 57 class GURL;
58 class ResourceDispatcherHost; 58 class ResourceDispatcherHost;
59 class TabContents; 59 class TabContents;
60 struct DownloadCreateInfo; 60 struct DownloadCreateInfo;
61 struct DownloadSaveInfo; 61 struct DownloadSaveInfo;
62 62
63 namespace content { 63 namespace content {
64 class BrowserContext; 64 class BrowserContext;
65 class DownloadManagerDelegate; 65 class DownloadManagerDelegate;
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 // The number of in progress (including paused) downloads. 239 // The number of in progress (including paused) downloads.
240 int in_progress_count() const { 240 int in_progress_count() const {
241 return static_cast<int>(in_progress_.size()); 241 return static_cast<int>(in_progress_.size());
242 } 242 }
243 243
244 content::BrowserContext* browser_context() { return browser_context_; } 244 content::BrowserContext* browser_context() { return browser_context_; }
245 245
246 FilePath last_download_path() { return last_download_path_; } 246 FilePath last_download_path() { return last_download_path_; }
247 247
248 // Creates the download item. Must be called on the UI thread. 248 // Creates the download item. Must be called on the UI thread.
249 void CreateDownloadItem(DownloadCreateInfo* info); 249 void CreateDownloadItem(DownloadCreateInfo* info,
250 const DownloadRequestHandle& request_handle);
250 251
251 // Clears the last download path, used to initialize "save as" dialogs. 252 // Clears the last download path, used to initialize "save as" dialogs.
252 void ClearLastDownloadPath(); 253 void ClearLastDownloadPath();
253 254
254 // Overridden from DownloadStatusUpdaterDelegate: 255 // Overridden from DownloadStatusUpdaterDelegate:
255 virtual bool IsDownloadProgressKnown(); 256 virtual bool IsDownloadProgressKnown();
256 virtual int64 GetInProgressDownloadCount(); 257 virtual int64 GetInProgressDownloadCount();
257 virtual int64 GetReceivedDownloadBytes(); 258 virtual int64 GetReceivedDownloadBytes();
258 virtual int64 GetTotalDownloadBytes(); 259 virtual int64 GetTotalDownloadBytes();
259 260
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 content::DownloadManagerDelegate* delegate_; 435 content::DownloadManagerDelegate* delegate_;
435 436
436 // TODO(rdsmith): Remove when http://crbug.com/85408 is fixed. 437 // TODO(rdsmith): Remove when http://crbug.com/85408 is fixed.
437 // For debugging only. 438 // For debugging only.
438 int64 largest_db_handle_in_history_; 439 int64 largest_db_handle_in_history_;
439 440
440 DISALLOW_COPY_AND_ASSIGN(DownloadManager); 441 DISALLOW_COPY_AND_ASSIGN(DownloadManager);
441 }; 442 };
442 443
443 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_H_ 444 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_H_
OLDNEW
« no previous file with comments | « content/browser/download/download_item.cc ('k') | content/browser/download/download_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698