| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #include "chrome/browser/browsing_data/downloads_counter.h" | 5 #include "chrome/browser/browsing_data/downloads_counter.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/guid.h" | 10 #include "base/guid.h" |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 time_, | 143 time_, |
| 144 time_, | 144 time_, |
| 145 std::string(), | 145 std::string(), |
| 146 std::string(), | 146 std::string(), |
| 147 1, | 147 1, |
| 148 1, | 148 1, |
| 149 std::string(), | 149 std::string(), |
| 150 state, | 150 state, |
| 151 danger, | 151 danger, |
| 152 reason, | 152 reason, |
| 153 false); | 153 false, |
| 154 std::vector<content::DownloadItem::ReceivedSlice>()); |
| 154 | 155 |
| 155 return guid; | 156 return guid; |
| 156 } | 157 } |
| 157 | 158 |
| 158 void RemoveDownload(const std::string& guid) { | 159 void RemoveDownload(const std::string& guid) { |
| 159 content::DownloadItem* item = manager_->GetDownloadByGuid(guid); | 160 content::DownloadItem* item = manager_->GetDownloadByGuid(guid); |
| 160 ids_to_remove_.insert(item->GetId()); | 161 ids_to_remove_.insert(item->GetId()); |
| 161 item->Remove(); | 162 item->Remove(); |
| 162 } | 163 } |
| 163 | 164 |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 EXPECT_EQ(7u, GetResult()); | 390 EXPECT_EQ(7u, GetResult()); |
| 390 | 391 |
| 391 SetDeletionPeriodPref(browsing_data::FOUR_WEEKS); | 392 SetDeletionPeriodPref(browsing_data::FOUR_WEEKS); |
| 392 EXPECT_EQ(8u, GetResult()); | 393 EXPECT_EQ(8u, GetResult()); |
| 393 | 394 |
| 394 SetDeletionPeriodPref(browsing_data::ALL_TIME); | 395 SetDeletionPeriodPref(browsing_data::ALL_TIME); |
| 395 EXPECT_EQ(11u, GetResult()); | 396 EXPECT_EQ(11u, GetResult()); |
| 396 } | 397 } |
| 397 | 398 |
| 398 } // namespace | 399 } // namespace |
| OLD | NEW |