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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 main_db_->AddVisit(&visit_row3, SOURCE_EXTENSION); | 312 main_db_->AddVisit(&visit_row3, SOURCE_EXTENSION); |
313 | 313 |
314 VisitRow visit_row4( | 314 VisitRow visit_row4( |
315 url_id, last_visit_time, 0, content::PAGE_TRANSITION_TYPED, 0); | 315 url_id, last_visit_time, 0, content::PAGE_TRANSITION_TYPED, 0); |
316 main_db_->AddVisit(&visit_row4, SOURCE_FIREFOX_IMPORTED); | 316 main_db_->AddVisit(&visit_row4, SOURCE_FIREFOX_IMPORTED); |
317 } | 317 } |
318 | 318 |
319 bool ExpireHistoryTest::HasFavicon(FaviconID favicon_id) { | 319 bool ExpireHistoryTest::HasFavicon(FaviconID favicon_id) { |
320 if (!thumb_db_.get() || favicon_id == 0) | 320 if (!thumb_db_.get() || favicon_id == 0) |
321 return false; | 321 return false; |
322 Time last_updated; | |
323 std::vector<unsigned char> icon_data_unused; | |
324 GURL icon_url; | 322 GURL icon_url; |
325 return thumb_db_->GetFavicon(favicon_id, &last_updated, &icon_data_unused, | 323 return thumb_db_->GetFaviconHeader(favicon_id, &icon_url, NULL, NULL); |
326 &icon_url, NULL); | |
327 } | 324 } |
328 | 325 |
329 FaviconID ExpireHistoryTest::GetFavicon(const GURL& page_url, | 326 FaviconID ExpireHistoryTest::GetFavicon(const GURL& page_url, |
330 IconType icon_type) { | 327 IconType icon_type) { |
331 IconMapping icon_mapping; | 328 IconMapping icon_mapping; |
332 thumb_db_->GetIconMappingForPageURL(page_url, icon_type, &icon_mapping); | 329 thumb_db_->GetIconMappingForPageURL(page_url, icon_type, &icon_mapping); |
333 return icon_mapping.icon_id; | 330 return icon_mapping.icon_id; |
334 } | 331 } |
335 | 332 |
336 bool ExpireHistoryTest::HasThumbnail(URLID url_id) { | 333 bool ExpireHistoryTest::HasThumbnail(URLID url_id) { |
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
956 main_db_->GetVisitsForURL(url_id, &archived_visits); | 953 main_db_->GetVisitsForURL(url_id, &archived_visits); |
957 EXPECT_EQ(0U, archived_visits.size()); | 954 EXPECT_EQ(0U, archived_visits.size()); |
958 } | 955 } |
959 | 956 |
960 // 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 |
961 // properly. Have the visits also refer to nonexistent FTS rows. | 958 // properly. Have the visits also refer to nonexistent FTS rows. |
962 // | 959 // |
963 // Maybe also refer to invalid favicons. | 960 // Maybe also refer to invalid favicons. |
964 | 961 |
965 } // namespace history | 962 } // namespace history |
OLD | NEW |