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

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: complete_callback is the droids you're looking for. 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 typedef base::hash_map<int64, content::DownloadItem*> DownloadMap; 123 typedef base::hash_map<int64, content::DownloadItem*> DownloadMap;
124 124
125 // For testing. 125 // For testing.
126 friend class DownloadManagerTest; 126 friend class DownloadManagerTest;
127 friend class DownloadTest; 127 friend class DownloadTest;
128 128
129 friend class base::RefCountedThreadSafe<DownloadManagerImpl>; 129 friend class base::RefCountedThreadSafe<DownloadManagerImpl>;
130 130
131 virtual ~DownloadManagerImpl(); 131 virtual ~DownloadManagerImpl();
132 132
133 // Does nothing if |download_id| is not an active download.
134 void MaybeCompleteDownloadById(int download_id);
135
133 // Determine if the download is ready for completion, i.e. has had 136 // Determine if the download is ready for completion, i.e. has had
134 // all data saved, and completed the filename determination and 137 // all data saved, and completed the filename determination and
135 // history insertion. 138 // history insertion.
136 bool IsDownloadReadyForCompletion(content::DownloadItem* download); 139 bool IsDownloadReadyForCompletion(content::DownloadItem* download);
137 140
138 // Show the download in the browser. 141 // Show the download in the browser.
139 void ShowDownloadInBrowser(content::DownloadItem* download); 142 void ShowDownloadInBrowser(content::DownloadItem* download);
140 143
141 // Get next download id. 144 // Get next download id.
142 content::DownloadId GetNextId(); 145 content::DownloadId GetNextId();
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 // TODO(rdsmith): Remove when http://crbug.com/85408 is fixed. 252 // TODO(rdsmith): Remove when http://crbug.com/85408 is fixed.
250 // For debugging only. 253 // For debugging only.
251 int64 largest_db_handle_in_history_; 254 int64 largest_db_handle_in_history_;
252 255
253 net::NetLog* net_log_; 256 net::NetLog* net_log_;
254 257
255 DISALLOW_COPY_AND_ASSIGN(DownloadManagerImpl); 258 DISALLOW_COPY_AND_ASSIGN(DownloadManagerImpl);
256 }; 259 };
257 260
258 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_ 261 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698