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

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

Issue 2720613002: Downloads: Added transient flag to download item and download database (Closed)
Patch Set: fix tests Created 3 years, 8 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 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 current, // last_access_time
437 std::vector<DownloadItem::ReceivedSlice>()); 437 false, std::vector<DownloadItem::ReceivedSlice>());
438 items->push_back(item); 438 items->push_back(item);
439 } 439 }
440 440
441 // Order by ID so that they are in the order that we created them. 441 // Order by ID so that they are in the order that we created them.
442 std::sort(items->begin(), items->end(), download_id_comparator); 442 std::sort(items->begin(), items->end(), download_id_comparator);
443 return true; 443 return true;
444 } 444 }
445 445
446 void CreateSlowTestDownloads( 446 void CreateSlowTestDownloads(
447 size_t count, DownloadManager::DownloadVector* items) { 447 size_t count, DownloadManager::DownloadVector* items) {
(...skipping 3849 matching lines...) Expand 10 before | Expand all | Expand 10 after
4297 EXPECT_EQ(downloads::FILENAME_CONFLICT_ACTION_PROMPT, conflict_action); 4297 EXPECT_EQ(downloads::FILENAME_CONFLICT_ACTION_PROMPT, conflict_action);
4298 EXPECT_FALSE(warnings.empty()); 4298 EXPECT_FALSE(warnings.empty());
4299 EXPECT_EQ(Warning::kDownloadFilenameConflict, 4299 EXPECT_EQ(Warning::kDownloadFilenameConflict,
4300 warnings.begin()->warning_type()); 4300 warnings.begin()->warning_type());
4301 EXPECT_EQ("incumbent", warnings.begin()->extension_id()); 4301 EXPECT_EQ("incumbent", warnings.begin()->extension_id());
4302 } 4302 }
4303 4303
4304 } // namespace extensions 4304 } // namespace extensions
4305 4305
4306 #endif // http://crbug.com/306144 4306 #endif // http://crbug.com/306144
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698