| 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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 return icon_mapping.icon_id; | 332 return icon_mapping.icon_id; |
| 333 } | 333 } |
| 334 | 334 |
| 335 bool ExpireHistoryTest::HasThumbnail(URLID url_id) { | 335 bool ExpireHistoryTest::HasThumbnail(URLID url_id) { |
| 336 // TODO(sky): fix this. This test isn't really valid for TopSites. For | 336 // TODO(sky): fix this. This test isn't really valid for TopSites. For |
| 337 // TopSites we should be checking URL always, not the id. | 337 // TopSites we should be checking URL always, not the id. |
| 338 URLRow info; | 338 URLRow info; |
| 339 if (!main_db_->GetURLRow(url_id, &info)) | 339 if (!main_db_->GetURLRow(url_id, &info)) |
| 340 return false; | 340 return false; |
| 341 GURL url = info.url(); | 341 GURL url = info.url(); |
| 342 scoped_refptr<RefCountedMemory> data; | 342 scoped_refptr<base::RefCountedMemory> data; |
| 343 return top_sites_->GetPageThumbnail(url, &data); | 343 return top_sites_->GetPageThumbnail(url, &data); |
| 344 } | 344 } |
| 345 | 345 |
| 346 int ExpireHistoryTest::CountTextMatchesForURL(const GURL& url) { | 346 int ExpireHistoryTest::CountTextMatchesForURL(const GURL& url) { |
| 347 if (!text_db_.get()) | 347 if (!text_db_.get()) |
| 348 return 0; | 348 return 0; |
| 349 | 349 |
| 350 // "body" should match all pages in the example data. | 350 // "body" should match all pages in the example data. |
| 351 std::vector<TextDatabase::Match> results; | 351 std::vector<TextDatabase::Match> results; |
| 352 QueryOptions options; | 352 QueryOptions options; |
| (...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 953 main_db_->GetVisitsForURL(url_id, &archived_visits); | 953 main_db_->GetVisitsForURL(url_id, &archived_visits); |
| 954 EXPECT_EQ(0U, archived_visits.size()); | 954 EXPECT_EQ(0U, archived_visits.size()); |
| 955 } | 955 } |
| 956 | 956 |
| 957 // TODO(brettw) add some visits with no URL to make sure everything is updated | 957 // TODO(brettw) add some visits with no URL to make sure everything is updated |
| 958 // properly. Have the visits also refer to nonexistent FTS rows. | 958 // properly. Have the visits also refer to nonexistent FTS rows. |
| 959 // | 959 // |
| 960 // Maybe also refer to invalid favicons. | 960 // Maybe also refer to invalid favicons. |
| 961 | 961 |
| 962 } // namespace history | 962 } // namespace history |
| OLD | NEW |