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

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

Issue 2665243003: add a download slices table into history download db (Closed)
Patch Set: add test file to BUILD.gn Created 3 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
« no previous file with comments | « chrome/browser/download/download_history.cc ('k') | components/history/core/browser/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 47LL, // total 288 47LL, // total
289 history::DownloadState::COMPLETE, // download_state 289 history::DownloadState::COMPLETE, // download_state
290 history::DownloadDangerType::NOT_DANGEROUS, // danger_type 290 history::DownloadDangerType::NOT_DANGEROUS, // danger_type
291 history::ToHistoryDownloadInterruptReason( 291 history::ToHistoryDownloadInterruptReason(
292 content::DOWNLOAD_INTERRUPT_REASON_NONE), // interrupt_reason, 292 content::DOWNLOAD_INTERRUPT_REASON_NONE), // interrupt_reason,
293 std::string(), // hash 293 std::string(), // hash
294 download_id_++, // id 294 download_id_++, // id
295 base::GenerateGUID(), // GUID 295 base::GenerateGUID(), // GUID
296 false, // download_opened 296 false, // download_opened
297 std::string(), // ext_id 297 std::string(), // ext_id
298 std::string()); // ext_name 298 std::string(), // ext_name
299 std::vector<history::DownloadSliceInfo>()); // download_slice_info
299 } 300 }
300 301
301 content::TestBrowserThreadBundle browser_thread_bundle_; 302 content::TestBrowserThreadBundle browser_thread_bundle_;
302 std::unique_ptr<TestingProfileManager> profile_manager_; 303 std::unique_ptr<TestingProfileManager> profile_manager_;
303 304
304 private: 305 private:
305 // A HistoryService::DownloadCreateCallback that asserts that the download was 306 // A HistoryService::DownloadCreateCallback that asserts that the download was
306 // created and runs |closure|. 307 // created and runs |closure|.
307 void ContinueOnDownloadCreated(const base::Closure& closure, bool created) { 308 void ContinueOnDownloadCreated(const base::Closure& closure, bool created) {
308 ASSERT_TRUE(created); 309 ASSERT_TRUE(created);
(...skipping 155 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/download/download_history.cc ('k') | components/history/core/browser/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698