Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(422)

Side by Side Diff: chrome/browser/history/top_sites_impl_unittest.cc

Issue 1005873011: Only record the execution time during startup. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update the histogram name. Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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,
311 TopSitesImpl::CALL_LOCATION_FROM_OTHER_PLACES);
311 } 312 }
312 313
313 bool AddForcedURL(const GURL& url, base::Time time) { 314 bool AddForcedURL(const GURL& url, base::Time time) {
314 return top_sites()->AddForcedURL(url, time); 315 return top_sites()->AddForcedURL(url, time);
315 } 316 }
316 317
317 void StartQueryForMostVisited() { 318 void StartQueryForMostVisited() {
318 top_sites()->StartQueryForMostVisited(); 319 top_sites()->StartQueryForMostVisited();
319 } 320 }
320 321
(...skipping 1335 matching lines...) Expand 10 before | Expand all | Expand 10 after
1656 ASSERT_EQ(orig_thumbnail.getSize(), thumbnail.getSize()); 1657 ASSERT_EQ(orig_thumbnail.getSize(), thumbnail.getSize());
1657 orig_thumbnail.lockPixels(); 1658 orig_thumbnail.lockPixels();
1658 thumbnail.lockPixels(); 1659 thumbnail.lockPixels();
1659 EXPECT_EQ(0, memcmp(orig_thumbnail.getPixels(), thumbnail.getPixels(), 1660 EXPECT_EQ(0, memcmp(orig_thumbnail.getPixels(), thumbnail.getPixels(),
1660 orig_thumbnail.getSize())); 1661 orig_thumbnail.getSize()));
1661 thumbnail.unlockPixels(); 1662 thumbnail.unlockPixels();
1662 orig_thumbnail.unlockPixels(); 1663 orig_thumbnail.unlockPixels();
1663 } 1664 }
1664 1665
1665 } // namespace history 1666 } // namespace history
OLDNEW
« no previous file with comments | « chrome/browser/history/top_sites_impl.cc ('k') | components/history/core/browser/top_sites_backend.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698