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

Side by Side Diff: chrome/browser/safe_browsing/incident_reporting/last_download_finder_unittest.cc

Issue 2720613002: Downloads: Added transient flag to download item and download database (Closed)
Patch Set: fix tests Created 3 years, 8 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/safe_browsing/incident_reporting/last_download_finder.h " 5 #include "chrome/browser/safe_browsing/incident_reporting/last_download_finder.h "
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 47LL, // total 293 47LL, // total
294 history::DownloadState::COMPLETE, // download_state 294 history::DownloadState::COMPLETE, // download_state
295 history::DownloadDangerType::NOT_DANGEROUS, // danger_type 295 history::DownloadDangerType::NOT_DANGEROUS, // danger_type
296 history::ToHistoryDownloadInterruptReason( 296 history::ToHistoryDownloadInterruptReason(
297 content::DOWNLOAD_INTERRUPT_REASON_NONE), // interrupt_reason, 297 content::DOWNLOAD_INTERRUPT_REASON_NONE), // interrupt_reason,
298 std::string(), // hash 298 std::string(), // hash
299 download_id_++, // id 299 download_id_++, // id
300 base::GenerateGUID(), // GUID 300 base::GenerateGUID(), // GUID
301 false, // download_opened 301 false, // download_opened
302 now - base::TimeDelta::FromMinutes(5), // last_access_time 302 now - base::TimeDelta::FromMinutes(5), // last_access_time
303 false, // transient
303 std::string(), // ext_id 304 std::string(), // ext_id
304 std::string(), // ext_name 305 std::string(), // ext_name
305 std::vector<history::DownloadSliceInfo>()); // download_slice_info 306 std::vector<history::DownloadSliceInfo>()); // download_slice_info
306 } 307 }
307 308
308 content::TestBrowserThreadBundle browser_thread_bundle_; 309 content::TestBrowserThreadBundle browser_thread_bundle_;
309 std::unique_ptr<TestingProfileManager> profile_manager_; 310 std::unique_ptr<TestingProfileManager> profile_manager_;
310 311
311 private: 312 private:
312 // A HistoryService::DownloadCreateCallback that asserts that the download was 313 // A HistoryService::DownloadCreateCallback that asserts that the download was
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 base::Bind(&LastDownloadFinderTest::OnLastDownload, 466 base::Bind(&LastDownloadFinderTest::OnLastDownload,
466 base::Unretained(this), &last_binary_download, 467 base::Unretained(this), &last_binary_download,
467 &last_non_binary_download, run_loop.QuitClosure()))); 468 &last_non_binary_download, run_loop.QuitClosure())));
468 469
469 run_loop.Run(); 470 run_loop.Run();
470 471
471 ASSERT_TRUE(last_binary_download); 472 ASSERT_TRUE(last_binary_download);
472 } 473 }
473 474
474 } // namespace safe_browsing 475 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698