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

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

Issue 26938003: Don't prompt to save malicious downloads on exit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed unneeded code Created 7 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 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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 download->GetId())); 165 download->GetId()));
166 break; 166 break;
167 167
168 case ON_DANGEROUS_DOWNLOAD_FAIL: 168 case ON_DANGEROUS_DOWNLOAD_FAIL:
169 ADD_FAILURE() << "Unexpected dangerous download item."; 169 ADD_FAILURE() << "Unexpected dangerous download item.";
170 break; 170 break;
171 171
172 case ON_DANGEROUS_DOWNLOAD_IGNORE: 172 case ON_DANGEROUS_DOWNLOAD_IGNORE:
173 break; 173 break;
174 174
175 case ON_DANGEROUS_DOWNLOAD_QUIT:
176 DownloadInFinalState(download);
177 break;
178
175 default: 179 default:
176 NOTREACHED(); 180 NOTREACHED();
177 } 181 }
178 } 182 }
179 183
180 if (IsDownloadInFinalState(download)) 184 if (IsDownloadInFinalState(download))
181 DownloadInFinalState(download); 185 DownloadInFinalState(download);
182 } 186 }
183 187
184 size_t DownloadTestObserver::NumDangerousDownloadsSeen() const { 188 size_t DownloadTestObserver::NumDangerousDownloadsSeen() const {
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 base::MessageLoopForUI::current()->Quit(); 446 base::MessageLoopForUI::current()->Quit();
443 } 447 }
444 448
445 const DownloadUrlParameters::OnStartedCallback 449 const DownloadUrlParameters::OnStartedCallback
446 DownloadTestItemCreationObserver::callback() { 450 DownloadTestItemCreationObserver::callback() {
447 return base::Bind( 451 return base::Bind(
448 &DownloadTestItemCreationObserver::DownloadItemCreationCallback, this); 452 &DownloadTestItemCreationObserver::DownloadItemCreationCallback, this);
449 } 453 }
450 454
451 } // namespace content 455 } // 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