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

Unified Diff: content/public/test/download_test_observer.cc

Issue 11068027: OnDownloadStarted takes DownloadItem* instead of DownloadId (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: @r160830 Created 8 years, 2 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: content/public/test/download_test_observer.cc
diff --git a/content/public/test/download_test_observer.cc b/content/public/test/download_test_observer.cc
index 6455027ef6d6c9c32324d9d1a546879866a4d1bb..7e3defe917997d45c2ea38ddad51d7b368aefe48 100644
--- a/content/public/test/download_test_observer.cc
+++ b/content/public/test/download_test_observer.cc
@@ -389,7 +389,7 @@ void DownloadTestFlushObserver::PingIOThread(int cycle) {
}
DownloadTestItemCreationObserver::DownloadTestItemCreationObserver()
- : download_id_(DownloadId::Invalid()),
+ : download_id_(DownloadId::Invalid().local()),
error_(net::OK),
called_back_count_(0),
waiting_(false) {
@@ -409,10 +409,11 @@ void DownloadTestItemCreationObserver::WaitForDownloadItemCreation() {
}
void DownloadTestItemCreationObserver::DownloadItemCreationCallback(
- DownloadId download_id, net::Error error) {
+ DownloadItem* item, net::Error error) {
sky 2012/10/09 16:16:11 nit: when you wrap, each param on its own line.
benjhayden 2012/10/09 20:57:18 Done.
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- download_id_ = download_id;
+ if (item)
+ download_id_ = item->GetId();
error_ = error;
++called_back_count_;
DCHECK_EQ(1u, called_back_count_);

Powered by Google App Engine
This is Rietveld 408576698