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

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

Issue 10263019: DownloadManagerDelegate::ShouldCompleteDownload(callback) (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: merge Created 8 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 5
6 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_ 6 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_
7 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_ 7 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_
8 #pragma once 8 #pragma once
9 9
10 #include <map> 10 #include <map>
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 typedef base::hash_map<int64, content::DownloadItem*> DownloadMap; 118 typedef base::hash_map<int64, content::DownloadItem*> DownloadMap;
119 119
120 // For testing. 120 // For testing.
121 friend class DownloadManagerTest; 121 friend class DownloadManagerTest;
122 friend class DownloadTest; 122 friend class DownloadTest;
123 123
124 friend class base::RefCountedThreadSafe<DownloadManagerImpl>; 124 friend class base::RefCountedThreadSafe<DownloadManagerImpl>;
125 125
126 virtual ~DownloadManagerImpl(); 126 virtual ~DownloadManagerImpl();
127 127
128 // Does nothing if |download_id| is not an active download.
129 void MaybeCompleteDownloadById(int download_id);
130
128 // Determine if the download is ready for completion, i.e. has had 131 // Determine if the download is ready for completion, i.e. has had
129 // all data saved, and completed the filename determination and 132 // all data saved, and completed the filename determination and
130 // history insertion. 133 // history insertion.
131 bool IsDownloadReadyForCompletion(content::DownloadItem* download); 134 bool IsDownloadReadyForCompletion(content::DownloadItem* download);
132 135
133 // Show the download in the browser. 136 // Show the download in the browser.
134 void ShowDownloadInBrowser(content::DownloadItem* download); 137 void ShowDownloadInBrowser(content::DownloadItem* download);
135 138
136 // Get next download id. 139 // Get next download id.
137 content::DownloadId GetNextId(); 140 content::DownloadId GetNextId();
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 235
233 // Allows an embedder to control behavior. Guaranteed to outlive this object. 236 // Allows an embedder to control behavior. Guaranteed to outlive this object.
234 content::DownloadManagerDelegate* delegate_; 237 content::DownloadManagerDelegate* delegate_;
235 238
236 net::NetLog* net_log_; 239 net::NetLog* net_log_;
237 240
238 DISALLOW_COPY_AND_ASSIGN(DownloadManagerImpl); 241 DISALLOW_COPY_AND_ASSIGN(DownloadManagerImpl);
239 }; 242 };
240 243
241 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_ 244 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/download/download_item_impl.h ('k') | content/browser/download/download_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698