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 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 GetOnRecordManager()->GetAllDownloads(items); | 415 GetOnRecordManager()->GetAllDownloads(items); |
416 CHECK_EQ(0, static_cast<int>(items->size())); | 416 CHECK_EQ(0, static_cast<int>(items->size())); |
417 std::vector<GURL> url_chain; | 417 std::vector<GURL> url_chain; |
418 url_chain.push_back(GURL()); | 418 url_chain.push_back(GURL()); |
419 for (size_t i = 0; i < count; ++i) { | 419 for (size_t i = 0; i < count; ++i) { |
420 DownloadItem* item = GetOnRecordManager()->CreateDownloadItem( | 420 DownloadItem* item = GetOnRecordManager()->CreateDownloadItem( |
421 content::DownloadItem::kInvalidId + 1 + i, | 421 content::DownloadItem::kInvalidId + 1 + i, |
422 downloads_directory().Append(history_info[i].filename), | 422 downloads_directory().Append(history_info[i].filename), |
423 downloads_directory().Append(history_info[i].filename), | 423 downloads_directory().Append(history_info[i].filename), |
424 url_chain, GURL(), // URL Chain, referrer | 424 url_chain, GURL(), // URL Chain, referrer |
| 425 std::string(), std::string(), // mime_type, original_mime_type |
425 current, current, // start_time, end_time | 426 current, current, // start_time, end_time |
426 std::string(), std::string(), // etag, last_modified | 427 std::string(), std::string(), // etag, last_modified |
427 1, 1, // received_bytes, total_bytes | 428 1, 1, // received_bytes, total_bytes |
428 history_info[i].state, // state | 429 history_info[i].state, // state |
429 content::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, | 430 content::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, |
430 content::DOWNLOAD_INTERRUPT_REASON_NONE, | 431 content::DOWNLOAD_INTERRUPT_REASON_NONE, |
431 false); // opened | 432 false); // opened |
432 items->push_back(item); | 433 items->push_back(item); |
433 } | 434 } |
434 | 435 |
(...skipping 3657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4092 EXPECT_EQ(downloads::FILENAME_CONFLICT_ACTION_PROMPT, conflict_action); | 4093 EXPECT_EQ(downloads::FILENAME_CONFLICT_ACTION_PROMPT, conflict_action); |
4093 EXPECT_FALSE(warnings.empty()); | 4094 EXPECT_FALSE(warnings.empty()); |
4094 EXPECT_EQ(ExtensionWarning::kDownloadFilenameConflict, | 4095 EXPECT_EQ(ExtensionWarning::kDownloadFilenameConflict, |
4095 warnings.begin()->warning_type()); | 4096 warnings.begin()->warning_type()); |
4096 EXPECT_EQ("incumbent", warnings.begin()->extension_id()); | 4097 EXPECT_EQ("incumbent", warnings.begin()->extension_id()); |
4097 } | 4098 } |
4098 | 4099 |
4099 } // namespace extensions | 4100 } // namespace extensions |
4100 | 4101 |
4101 #endif // http://crbug.com/3061144 | 4102 #endif // http://crbug.com/3061144 |
OLD | NEW |