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 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 std::string(), | 425 std::string(), |
426 std::string(), // etag, last_modified | 426 std::string(), // etag, last_modified |
427 1, | 427 1, |
428 1, // received_bytes, total_bytes | 428 1, // received_bytes, total_bytes |
429 std::string(), // hash | 429 std::string(), // hash |
430 history_info[i].state, // state | 430 history_info[i].state, // state |
431 history_info[i].danger_type, | 431 history_info[i].danger_type, |
432 (history_info[i].state != content::DownloadItem::CANCELLED | 432 (history_info[i].state != content::DownloadItem::CANCELLED |
433 ? content::DOWNLOAD_INTERRUPT_REASON_NONE | 433 ? content::DOWNLOAD_INTERRUPT_REASON_NONE |
434 : content::DOWNLOAD_INTERRUPT_REASON_USER_CANCELED), | 434 : content::DOWNLOAD_INTERRUPT_REASON_USER_CANCELED), |
435 false); // opened | 435 false, // opened |
| 436 current); // last_access_time |
436 items->push_back(item); | 437 items->push_back(item); |
437 } | 438 } |
438 | 439 |
439 // Order by ID so that they are in the order that we created them. | 440 // Order by ID so that they are in the order that we created them. |
440 std::sort(items->begin(), items->end(), download_id_comparator); | 441 std::sort(items->begin(), items->end(), download_id_comparator); |
441 return true; | 442 return true; |
442 } | 443 } |
443 | 444 |
444 void CreateSlowTestDownloads( | 445 void CreateSlowTestDownloads( |
445 size_t count, DownloadManager::DownloadVector* items) { | 446 size_t count, DownloadManager::DownloadVector* items) { |
(...skipping 3855 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4301 EXPECT_EQ(downloads::FILENAME_CONFLICT_ACTION_PROMPT, conflict_action); | 4302 EXPECT_EQ(downloads::FILENAME_CONFLICT_ACTION_PROMPT, conflict_action); |
4302 EXPECT_FALSE(warnings.empty()); | 4303 EXPECT_FALSE(warnings.empty()); |
4303 EXPECT_EQ(Warning::kDownloadFilenameConflict, | 4304 EXPECT_EQ(Warning::kDownloadFilenameConflict, |
4304 warnings.begin()->warning_type()); | 4305 warnings.begin()->warning_type()); |
4305 EXPECT_EQ("incumbent", warnings.begin()->extension_id()); | 4306 EXPECT_EQ("incumbent", warnings.begin()->extension_id()); |
4306 } | 4307 } |
4307 | 4308 |
4308 } // namespace extensions | 4309 } // namespace extensions |
4309 | 4310 |
4310 #endif // http://crbug.com/306144 | 4311 #endif // http://crbug.com/306144 |
OLD | NEW |