| 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 #include <algorithm> | 5 #include <algorithm> |
| 6 #include <string> | 6 #include <string> |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 } | 304 } |
| 305 | 305 |
| 306 bool ExpireHistoryTest::HasThumbnail(URLID url_id) { | 306 bool ExpireHistoryTest::HasThumbnail(URLID url_id) { |
| 307 // TODO(sky): fix this. This test isn't really valid for TopSites. For | 307 // TODO(sky): fix this. This test isn't really valid for TopSites. For |
| 308 // TopSites we should be checking URL always, not the id. | 308 // TopSites we should be checking URL always, not the id. |
| 309 URLRow info; | 309 URLRow info; |
| 310 if (!main_db_->GetURLRow(url_id, &info)) | 310 if (!main_db_->GetURLRow(url_id, &info)) |
| 311 return false; | 311 return false; |
| 312 GURL url = info.url(); | 312 GURL url = info.url(); |
| 313 scoped_refptr<base::RefCountedMemory> data; | 313 scoped_refptr<base::RefCountedMemory> data; |
| 314 return top_sites_->GetPageThumbnail(url, &data); | 314 return top_sites_->GetPageThumbnail(url, false, &data); |
| 315 } | 315 } |
| 316 | 316 |
| 317 void ExpireHistoryTest::EnsureURLInfoGone(const URLRow& row) { | 317 void ExpireHistoryTest::EnsureURLInfoGone(const URLRow& row) { |
| 318 // Verify the URL no longer exists. | 318 // Verify the URL no longer exists. |
| 319 URLRow temp_row; | 319 URLRow temp_row; |
| 320 EXPECT_FALSE(main_db_->GetURLRow(row.id(), &temp_row)); | 320 EXPECT_FALSE(main_db_->GetURLRow(row.id(), &temp_row)); |
| 321 | 321 |
| 322 // There should be no visits. | 322 // There should be no visits. |
| 323 VisitVector visits; | 323 VisitVector visits; |
| 324 main_db_->GetVisitsForURL(row.id(), &visits); | 324 main_db_->GetVisitsForURL(row.id(), &visits); |
| (...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 896 main_db_->GetVisitsForURL(url_id, &archived_visits); | 896 main_db_->GetVisitsForURL(url_id, &archived_visits); |
| 897 EXPECT_EQ(0U, archived_visits.size()); | 897 EXPECT_EQ(0U, archived_visits.size()); |
| 898 } | 898 } |
| 899 | 899 |
| 900 // TODO(brettw) add some visits with no URL to make sure everything is updated | 900 // TODO(brettw) add some visits with no URL to make sure everything is updated |
| 901 // properly. Have the visits also refer to nonexistent FTS rows. | 901 // properly. Have the visits also refer to nonexistent FTS rows. |
| 902 // | 902 // |
| 903 // Maybe also refer to invalid favicons. | 903 // Maybe also refer to invalid favicons. |
| 904 | 904 |
| 905 } // namespace history | 905 } // namespace history |
| OLD | NEW |