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

Side by Side Diff: chrome/browser/extensions/api/downloads/downloads_api_browsertest.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 // Disable everything on windows only. http://crbug.com/306144 5 // Disable everything on windows only. http://crbug.com/306144
6 #ifndef OS_WIN 6 #ifndef OS_WIN
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 url_chain, 434 url_chain,
435 GURL(), // URL Chain, referrer 435 GURL(), // URL Chain, referrer
436 std::string(), 436 std::string(),
437 std::string(), // mime_type, original_mime_type 437 std::string(), // mime_type, original_mime_type
438 current, 438 current,
439 current, // start_time, end_time 439 current, // start_time, end_time
440 std::string(), 440 std::string(),
441 std::string(), // etag, last_modified 441 std::string(), // etag, last_modified
442 1, 442 1,
443 1, // received_bytes, total_bytes 443 1, // received_bytes, total_bytes
444 std::string(), // hash
444 history_info[i].state, // state 445 history_info[i].state, // state
445 history_info[i].danger_type, 446 history_info[i].danger_type,
446 (history_info[i].state != content::DownloadItem::CANCELLED 447 (history_info[i].state != content::DownloadItem::CANCELLED
447 ? content::DOWNLOAD_INTERRUPT_REASON_NONE 448 ? content::DOWNLOAD_INTERRUPT_REASON_NONE
448 : content::DOWNLOAD_INTERRUPT_REASON_USER_CANCELED), 449 : content::DOWNLOAD_INTERRUPT_REASON_USER_CANCELED),
449 false); // opened 450 false); // opened
450 items->push_back(item); 451 items->push_back(item);
451 } 452 }
452 453
453 // Order by ID so that they are in the order that we created them. 454 // Order by ID so that they are in the order that we created them.
(...skipping 3730 matching lines...) Expand 10 before | Expand all | Expand 10 after
4184 EXPECT_EQ(downloads::FILENAME_CONFLICT_ACTION_PROMPT, conflict_action); 4185 EXPECT_EQ(downloads::FILENAME_CONFLICT_ACTION_PROMPT, conflict_action);
4185 EXPECT_FALSE(warnings.empty()); 4186 EXPECT_FALSE(warnings.empty());
4186 EXPECT_EQ(Warning::kDownloadFilenameConflict, 4187 EXPECT_EQ(Warning::kDownloadFilenameConflict,
4187 warnings.begin()->warning_type()); 4188 warnings.begin()->warning_type());
4188 EXPECT_EQ("incumbent", warnings.begin()->extension_id()); 4189 EXPECT_EQ("incumbent", warnings.begin()->extension_id());
4189 } 4190 }
4190 4191
4191 } // namespace extensions 4192 } // namespace extensions
4192 4193
4193 #endif // http://crbug.com/306144 4194 #endif // http://crbug.com/306144
OLDNEW
« no previous file with comments | « chrome/browser/download/download_item_model_unittest.cc ('k') | chrome/common/extensions/api/downloads.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698