OLD | NEW |
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 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 for (size_t i = 0; i < count; ++i) { | 427 for (size_t i = 0; i < count; ++i) { |
428 DownloadItem* item = GetOnRecordManager()->CreateDownloadItem( | 428 DownloadItem* item = GetOnRecordManager()->CreateDownloadItem( |
429 content::DownloadItem::kInvalidId + 1 + i, | 429 content::DownloadItem::kInvalidId + 1 + i, |
430 downloads_directory().Append(history_info[i].filename), | 430 downloads_directory().Append(history_info[i].filename), |
431 downloads_directory().Append(history_info[i].filename), url_chain, | 431 downloads_directory().Append(history_info[i].filename), url_chain, |
432 GURL(), // URL Chain, referrer | 432 GURL(), // URL Chain, referrer |
433 std::string(), std::string(), // mime_type, original_mime_type | 433 std::string(), std::string(), // mime_type, original_mime_type |
434 current, current, // start_time, end_time | 434 current, current, // start_time, end_time |
435 std::string(), std::string(), // etag, last_modified | 435 std::string(), std::string(), // etag, last_modified |
436 1, 1, // received_bytes, total_bytes | 436 1, 1, // received_bytes, total_bytes |
| 437 std::string(), // hash |
437 history_info[i].state, // state | 438 history_info[i].state, // state |
438 history_info[i].danger_type, | 439 history_info[i].danger_type, |
439 (history_info[i].state != content::DownloadItem::CANCELLED | 440 (history_info[i].state != content::DownloadItem::CANCELLED |
440 ? content::DOWNLOAD_INTERRUPT_REASON_NONE | 441 ? content::DOWNLOAD_INTERRUPT_REASON_NONE |
441 : content::DOWNLOAD_INTERRUPT_REASON_USER_CANCELED), | 442 : content::DOWNLOAD_INTERRUPT_REASON_USER_CANCELED), |
442 false); // opened | 443 false); // opened |
443 items->push_back(item); | 444 items->push_back(item); |
444 } | 445 } |
445 | 446 |
446 // Order by ID so that they are in the order that we created them. | 447 // 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 Loading... |
4177 EXPECT_EQ(downloads::FILENAME_CONFLICT_ACTION_PROMPT, conflict_action); | 4178 EXPECT_EQ(downloads::FILENAME_CONFLICT_ACTION_PROMPT, conflict_action); |
4178 EXPECT_FALSE(warnings.empty()); | 4179 EXPECT_FALSE(warnings.empty()); |
4179 EXPECT_EQ(Warning::kDownloadFilenameConflict, | 4180 EXPECT_EQ(Warning::kDownloadFilenameConflict, |
4180 warnings.begin()->warning_type()); | 4181 warnings.begin()->warning_type()); |
4181 EXPECT_EQ("incumbent", warnings.begin()->extension_id()); | 4182 EXPECT_EQ("incumbent", warnings.begin()->extension_id()); |
4182 } | 4183 } |
4183 | 4184 |
4184 } // namespace extensions | 4185 } // namespace extensions |
4185 | 4186 |
4186 #endif // http://crbug.com/306144 | 4187 #endif // http://crbug.com/306144 |
OLD | NEW |