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

Side by Side Diff: content/public/test/download_test_observer.cc

Issue 11363222: Persist download interrupt reason, both target and current paths, and url_chain. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged to r180302 Created 7 years, 10 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 #include "content/public/test/download_test_observer.h" 5 #include "content/public/test/download_test_observer.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 BrowserThread::PostTask( 181 BrowserThread::PostTask(
182 BrowserThread::UI, FROM_HERE, 182 BrowserThread::UI, FROM_HERE,
183 base::Bind(&DenyDangerousDownload, download_manager_, 183 base::Bind(&DenyDangerousDownload, download_manager_,
184 download->GetId())); 184 download->GetId()));
185 break; 185 break;
186 186
187 case ON_DANGEROUS_DOWNLOAD_FAIL: 187 case ON_DANGEROUS_DOWNLOAD_FAIL:
188 ADD_FAILURE() << "Unexpected dangerous download item."; 188 ADD_FAILURE() << "Unexpected dangerous download item.";
189 break; 189 break;
190 190
191 case ON_DANGEROUS_DOWNLOAD_IGNORE:
192 break;
193
191 default: 194 default:
192 NOTREACHED(); 195 NOTREACHED();
193 } 196 }
194 } 197 }
195 198
196 if (IsDownloadInFinalState(download)) 199 if (IsDownloadInFinalState(download))
197 DownloadInFinalState(download); 200 DownloadInFinalState(download);
198 } 201 }
199 202
200 size_t DownloadTestObserver::NumDangerousDownloadsSeen() const { 203 size_t DownloadTestObserver::NumDangerousDownloadsSeen() const {
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 MessageLoopForUI::current()->Quit(); 418 MessageLoopForUI::current()->Quit();
416 } 419 }
417 420
418 const DownloadUrlParameters::OnStartedCallback 421 const DownloadUrlParameters::OnStartedCallback
419 DownloadTestItemCreationObserver::callback() { 422 DownloadTestItemCreationObserver::callback() {
420 return base::Bind( 423 return base::Bind(
421 &DownloadTestItemCreationObserver::DownloadItemCreationCallback, this); 424 &DownloadTestItemCreationObserver::DownloadItemCreationCallback, this);
422 } 425 }
423 426
424 } // namespace content 427 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/download_test_observer.h ('k') | content/public/test/mock_download_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698