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

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

Issue 839193002: Move ServiceAccessType into //components/keyed_service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation on android Created 5 years, 11 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
« no previous file with comments | « chrome/browser/history/top_sites_impl.cc ('k') | chrome/browser/importer/profile_writer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 base::Bind(&TopSitesImplTest::QuitCallback, base::Unretained(this)), 233 base::Bind(&TopSitesImplTest::QuitCallback, base::Unretained(this)),
234 &top_sites_tracker_); 234 &top_sites_tracker_);
235 base::MessageLoop::current()->Run(); 235 base::MessageLoop::current()->Run();
236 } 236 }
237 237
238 TopSitesImpl* top_sites() { 238 TopSitesImpl* top_sites() {
239 return static_cast<TopSitesImpl*>(profile_->GetTopSites()); 239 return static_cast<TopSitesImpl*>(profile_->GetTopSites());
240 } 240 }
241 TestingProfile* profile() {return profile_.get();} 241 TestingProfile* profile() {return profile_.get();}
242 HistoryService* history_service() { 242 HistoryService* history_service() {
243 return HistoryServiceFactory::GetForProfile(profile_.get(), 243 return HistoryServiceFactory::GetForProfile(
244 Profile::EXPLICIT_ACCESS); 244 profile_.get(), ServiceAccessType::EXPLICIT_ACCESS);
245 } 245 }
246 246
247 MostVisitedURLList GetPrepopulatePages() { 247 MostVisitedURLList GetPrepopulatePages() {
248 return top_sites()->GetPrepopulatePages(); 248 return top_sites()->GetPrepopulatePages();
249 } 249 }
250 250
251 // Returns true if the TopSitesQuerier contains the prepopulate data starting 251 // Returns true if the TopSitesQuerier contains the prepopulate data starting
252 // at |start_index|. 252 // at |start_index|.
253 void ContainsPrepopulatePages(const TopSitesQuerier& querier, 253 void ContainsPrepopulatePages(const TopSitesQuerier& querier,
254 size_t start_index) { 254 size_t start_index) {
(...skipping 1427 matching lines...) Expand 10 before | Expand all | Expand 10 after
1682 ASSERT_EQ(orig_thumbnail.getSize(), thumbnail.getSize()); 1682 ASSERT_EQ(orig_thumbnail.getSize(), thumbnail.getSize());
1683 orig_thumbnail.lockPixels(); 1683 orig_thumbnail.lockPixels();
1684 thumbnail.lockPixels(); 1684 thumbnail.lockPixels();
1685 EXPECT_EQ(0, memcmp(orig_thumbnail.getPixels(), thumbnail.getPixels(), 1685 EXPECT_EQ(0, memcmp(orig_thumbnail.getPixels(), thumbnail.getPixels(),
1686 orig_thumbnail.getSize())); 1686 orig_thumbnail.getSize()));
1687 thumbnail.unlockPixels(); 1687 thumbnail.unlockPixels();
1688 orig_thumbnail.unlockPixels(); 1688 orig_thumbnail.unlockPixels();
1689 } 1689 }
1690 1690
1691 } // namespace history 1691 } // namespace history
OLDNEW
« no previous file with comments | « chrome/browser/history/top_sites_impl.cc ('k') | chrome/browser/importer/profile_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698