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 <algorithm> | 8 #include <algorithm> |
9 | 9 |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 GetOnRecordManager()->GetAllDownloads(items); | 420 GetOnRecordManager()->GetAllDownloads(items); |
421 CHECK_EQ(0, static_cast<int>(items->size())); | 421 CHECK_EQ(0, static_cast<int>(items->size())); |
422 std::vector<GURL> url_chain; | 422 std::vector<GURL> url_chain; |
423 url_chain.push_back(GURL()); | 423 url_chain.push_back(GURL()); |
424 for (size_t i = 0; i < count; ++i) { | 424 for (size_t i = 0; i < count; ++i) { |
425 DownloadItem* item = GetOnRecordManager()->CreateDownloadItem( | 425 DownloadItem* item = GetOnRecordManager()->CreateDownloadItem( |
426 content::DownloadItem::kInvalidId + 1 + i, | 426 content::DownloadItem::kInvalidId + 1 + i, |
427 downloads_directory().Append(history_info[i].filename), | 427 downloads_directory().Append(history_info[i].filename), |
428 downloads_directory().Append(history_info[i].filename), | 428 downloads_directory().Append(history_info[i].filename), |
429 url_chain, GURL(), // URL Chain, referrer | 429 url_chain, GURL(), // URL Chain, referrer |
| 430 std::string(), std::string(), // mime_type, original_mime_type |
430 current, current, // start_time, end_time | 431 current, current, // start_time, end_time |
431 std::string(), std::string(), // etag, last_modified | 432 std::string(), std::string(), // etag, last_modified |
432 1, 1, // received_bytes, total_bytes | 433 1, 1, // received_bytes, total_bytes |
433 history_info[i].state, // state | 434 history_info[i].state, // state |
434 content::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, | 435 content::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, |
435 content::DOWNLOAD_INTERRUPT_REASON_NONE, | 436 content::DOWNLOAD_INTERRUPT_REASON_NONE, |
436 false); // opened | 437 false); // opened |
437 items->push_back(item); | 438 items->push_back(item); |
438 } | 439 } |
439 | 440 |
(...skipping 3191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3631 EXPECT_EQ("suggester", winner_id); | 3632 EXPECT_EQ("suggester", winner_id); |
3632 EXPECT_EQ(FILE_PATH_LITERAL("b"), filename.value()); | 3633 EXPECT_EQ(FILE_PATH_LITERAL("b"), filename.value()); |
3633 EXPECT_EQ(api::FILENAME_CONFLICT_ACTION_PROMPT, conflict_action); | 3634 EXPECT_EQ(api::FILENAME_CONFLICT_ACTION_PROMPT, conflict_action); |
3634 EXPECT_FALSE(warnings.empty()); | 3635 EXPECT_FALSE(warnings.empty()); |
3635 EXPECT_EQ(extensions::ExtensionWarning::kDownloadFilenameConflict, | 3636 EXPECT_EQ(extensions::ExtensionWarning::kDownloadFilenameConflict, |
3636 warnings.begin()->warning_type()); | 3637 warnings.begin()->warning_type()); |
3637 EXPECT_EQ("incumbent", warnings.begin()->extension_id()); | 3638 EXPECT_EQ("incumbent", warnings.begin()->extension_id()); |
3638 } | 3639 } |
3639 | 3640 |
3640 #endif // http://crbug.com/3061144 | 3641 #endif // http://crbug.com/3061144 |
OLD | NEW |