| 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/memory/weak_ptr.h" | 6 #include "base/memory/weak_ptr.h" |
| 7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "base/task/cancelable_task_tracker.h" | 9 #include "base/task/cancelable_task_tracker.h" |
| 10 #include "chrome/browser/history/history_service_factory.h" | 10 #include "chrome/browser/history/history_service_factory.h" |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 profile()->BlockUntilTopSitesLoaded(); | 300 profile()->BlockUntilTopSitesLoaded(); |
| 301 } | 301 } |
| 302 | 302 |
| 303 // Wrappers that allow private TopSites functions to be called from the | 303 // Wrappers that allow private TopSites functions to be called from the |
| 304 // individual tests without making them all be friends. | 304 // individual tests without making them all be friends. |
| 305 GURL GetCanonicalURL(const GURL& url) { | 305 GURL GetCanonicalURL(const GURL& url) { |
| 306 return top_sites()->cache_->GetCanonicalURL(url); | 306 return top_sites()->cache_->GetCanonicalURL(url); |
| 307 } | 307 } |
| 308 | 308 |
| 309 void SetTopSites(const MostVisitedURLList& new_top_sites) { | 309 void SetTopSites(const MostVisitedURLList& new_top_sites) { |
| 310 top_sites()->SetTopSites(new_top_sites); | 310 top_sites()->SetTopSites(new_top_sites, false); |
| 311 } | 311 } |
| 312 | 312 |
| 313 bool AddForcedURL(const GURL& url, base::Time time) { | 313 bool AddForcedURL(const GURL& url, base::Time time) { |
| 314 return top_sites()->AddForcedURL(url, time); | 314 return top_sites()->AddForcedURL(url, time); |
| 315 } | 315 } |
| 316 | 316 |
| 317 void StartQueryForMostVisited() { | 317 void StartQueryForMostVisited() { |
| 318 top_sites()->StartQueryForMostVisited(); | 318 top_sites()->StartQueryForMostVisited(); |
| 319 } | 319 } |
| 320 | 320 |
| (...skipping 1335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1656 ASSERT_EQ(orig_thumbnail.getSize(), thumbnail.getSize()); | 1656 ASSERT_EQ(orig_thumbnail.getSize(), thumbnail.getSize()); |
| 1657 orig_thumbnail.lockPixels(); | 1657 orig_thumbnail.lockPixels(); |
| 1658 thumbnail.lockPixels(); | 1658 thumbnail.lockPixels(); |
| 1659 EXPECT_EQ(0, memcmp(orig_thumbnail.getPixels(), thumbnail.getPixels(), | 1659 EXPECT_EQ(0, memcmp(orig_thumbnail.getPixels(), thumbnail.getPixels(), |
| 1660 orig_thumbnail.getSize())); | 1660 orig_thumbnail.getSize())); |
| 1661 thumbnail.unlockPixels(); | 1661 thumbnail.unlockPixels(); |
| 1662 orig_thumbnail.unlockPixels(); | 1662 orig_thumbnail.unlockPixels(); |
| 1663 } | 1663 } |
| 1664 | 1664 |
| 1665 } // namespace history | 1665 } // namespace history |
| OLD | NEW |