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

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

Issue 2705283003: Added last_access_time to DownloadItem and History DB (Closed)
Patch Set: rebase origin/master Created 3 years, 9 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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 47LL, // received 292 47LL, // received
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 std::string(), // ext_id 303 std::string(), // ext_id
303 std::string(), // ext_name 304 std::string(), // ext_name
304 std::vector<history::DownloadSliceInfo>()); // download_slice_info 305 std::vector<history::DownloadSliceInfo>()); // download_slice_info
305 } 306 }
306 307
307 content::TestBrowserThreadBundle browser_thread_bundle_; 308 content::TestBrowserThreadBundle browser_thread_bundle_;
308 std::unique_ptr<TestingProfileManager> profile_manager_; 309 std::unique_ptr<TestingProfileManager> profile_manager_;
309 310
310 private: 311 private:
311 // A HistoryService::DownloadCreateCallback that asserts that the download was 312 // A HistoryService::DownloadCreateCallback that asserts that the download was
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 base::Bind(&LastDownloadFinderTest::OnLastDownload, 465 base::Bind(&LastDownloadFinderTest::OnLastDownload,
465 base::Unretained(this), &last_binary_download, 466 base::Unretained(this), &last_binary_download,
466 &last_non_binary_download, run_loop.QuitClosure()))); 467 &last_non_binary_download, run_loop.QuitClosure())));
467 468
468 run_loop.Run(); 469 run_loop.Run();
469 470
470 ASSERT_TRUE(last_binary_download); 471 ASSERT_TRUE(last_binary_download);
471 } 472 }
472 473
473 } // namespace safe_browsing 474 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « chrome/browser/ntp_snippets/fake_download_item.cc ('k') | components/history/core/browser/download_database.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698