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

Side by Side Diff: chrome/browser/download/download_history_unittest.cc

Issue 1751603002: [Downloads] Rework how hashes are calculated for download files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase on top of https://codereview.chromium.org/1781983002 since that's going in first. Created 4 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 (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 "chrome/browser/download/download_history.h" 5 #include "chrome/browser/download/download_history.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 row.url_chain, 217 row.url_chain,
218 row.referrer_url, 218 row.referrer_url,
219 row.mime_type, 219 row.mime_type,
220 row.original_mime_type, 220 row.original_mime_type,
221 row.start_time, 221 row.start_time,
222 row.end_time, 222 row.end_time,
223 row.etag, 223 row.etag,
224 row.last_modified, 224 row.last_modified,
225 row.received_bytes, 225 row.received_bytes,
226 row.total_bytes, 226 row.total_bytes,
227 std::string(),
227 history::ToContentDownloadState(row.state), 228 history::ToContentDownloadState(row.state),
228 history::ToContentDownloadDangerType(row.danger_type), 229 history::ToContentDownloadDangerType(row.danger_type),
229 history::ToContentDownloadInterruptReason(row.interrupt_reason), 230 history::ToContentDownloadInterruptReason(row.interrupt_reason),
230 row.opened); 231 row.opened);
231 EXPECT_CALL(manager(), MockCreateDownloadItem(adapter)) 232 EXPECT_CALL(manager(), MockCreateDownloadItem(adapter))
232 .WillOnce(DoAll( 233 .WillOnce(DoAll(
233 InvokeWithoutArgs( 234 InvokeWithoutArgs(
234 this, &DownloadHistoryTest::CallOnDownloadCreatedInOrder), 235 this, &DownloadHistoryTest::CallOnDownloadCreatedInOrder),
235 Return(&item(index)))); 236 Return(&item(index))));
236 } 237 }
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after
844 FinishCreateDownload(); 845 FinishCreateDownload();
845 EXPECT_TRUE(DownloadHistory::IsPersisted(&item(0))); 846 EXPECT_TRUE(DownloadHistory::IsPersisted(&item(0)));
846 847
847 // ItemAdded should call OnDownloadUpdated, which should detect that the item 848 // ItemAdded should call OnDownloadUpdated, which should detect that the item
848 // changed while it was being added and call UpdateDownload immediately. 849 // changed while it was being added and call UpdateDownload immediately.
849 info.opened = true; 850 info.opened = true;
850 ExpectDownloadUpdated(info); 851 ExpectDownloadUpdated(info);
851 } 852 }
852 853
853 } // anonymous namespace 854 } // anonymous namespace
OLDNEW
« no previous file with comments | « chrome/browser/download/download_history.cc ('k') | chrome/browser/download/download_item_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698