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

Side by Side Diff: chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc

Issue 2703883003: Read and restore persisted slice info (Closed)
Patch Set: Created 3 years, 10 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 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
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,
436 std::vector<DownloadItem::ReceivedSlice>()); // opened
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
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
OLDNEW
« no previous file with comments | « chrome/browser/download/download_history_unittest.cc ('k') | chrome/browser/ntp_snippets/fake_download_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698