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

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

Issue 2705283003: Added last_access_time to DownloadItem and History DB (Closed)
Patch Set: rebase origin/master Created 3 years, 9 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, // opened
436 current, // last_access_time
436 std::vector<DownloadItem::ReceivedSlice>()); 437 std::vector<DownloadItem::ReceivedSlice>());
437 items->push_back(item); 438 items->push_back(item);
438 } 439 }
439 440
440 // 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.
441 std::sort(items->begin(), items->end(), download_id_comparator); 442 std::sort(items->begin(), items->end(), download_id_comparator);
442 return true; 443 return true;
443 } 444 }
444 445
445 void CreateSlowTestDownloads( 446 void CreateSlowTestDownloads(
(...skipping 3856 matching lines...) Expand 10 before | Expand all | Expand 10 after
4302 EXPECT_EQ(downloads::FILENAME_CONFLICT_ACTION_PROMPT, conflict_action); 4303 EXPECT_EQ(downloads::FILENAME_CONFLICT_ACTION_PROMPT, conflict_action);
4303 EXPECT_FALSE(warnings.empty()); 4304 EXPECT_FALSE(warnings.empty());
4304 EXPECT_EQ(Warning::kDownloadFilenameConflict, 4305 EXPECT_EQ(Warning::kDownloadFilenameConflict,
4305 warnings.begin()->warning_type()); 4306 warnings.begin()->warning_type());
4306 EXPECT_EQ("incumbent", warnings.begin()->extension_id()); 4307 EXPECT_EQ("incumbent", warnings.begin()->extension_id());
4307 } 4308 }
4308 4309
4309 } // namespace extensions 4310 } // namespace extensions
4310 4311
4311 #endif // http://crbug.com/306144 4312 #endif // http://crbug.com/306144
OLDNEW
« no previous file with comments | « chrome/browser/download/download_ui_controller_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