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

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

Issue 137263007: Move CancelableTaskTracker to //base/task/CancelableTaskTracker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move to base/task/cancelable_task_tracker* Created 6 years, 10 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.h ('k') | chrome/browser/icon_manager.h » ('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/path_service.h" 8 #include "base/path_service.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/task/cancelable_task_tracker.h"
10 #include "chrome/browser/history/history_db_task.h" 11 #include "chrome/browser/history/history_db_task.h"
11 #include "chrome/browser/history/history_service_factory.h" 12 #include "chrome/browser/history/history_service_factory.h"
12 #include "chrome/browser/history/history_types.h" 13 #include "chrome/browser/history/history_types.h"
13 #include "chrome/browser/history/history_unittest_base.h" 14 #include "chrome/browser/history/history_unittest_base.h"
14 #include "chrome/browser/history/top_sites_cache.h" 15 #include "chrome/browser/history/top_sites_cache.h"
15 #include "chrome/browser/history/top_sites_impl.h" 16 #include "chrome/browser/history/top_sites_impl.h"
16 #include "chrome/common/cancelable_task_tracker.h"
17 #include "chrome/common/chrome_constants.h" 17 #include "chrome/common/chrome_constants.h"
18 #include "chrome/common/chrome_paths.h" 18 #include "chrome/common/chrome_paths.h"
19 #include "chrome/test/base/testing_profile.h" 19 #include "chrome/test/base/testing_profile.h"
20 #include "content/public/test/test_browser_thread.h" 20 #include "content/public/test/test_browser_thread.h"
21 #include "testing/gtest/include/gtest/gtest.h" 21 #include "testing/gtest/include/gtest/gtest.h"
22 #include "third_party/skia/include/core/SkBitmap.h" 22 #include "third_party/skia/include/core/SkBitmap.h"
23 #include "ui/gfx/codec/jpeg_codec.h" 23 #include "ui/gfx/codec/jpeg_codec.h"
24 #include "url/gurl.h" 24 #include "url/gurl.h"
25 25
26 using content::BrowserThread; 26 using content::BrowserThread;
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 private: 329 private:
330 base::MessageLoopForUI message_loop_; 330 base::MessageLoopForUI message_loop_;
331 content::TestBrowserThread ui_thread_; 331 content::TestBrowserThread ui_thread_;
332 content::TestBrowserThread db_thread_; 332 content::TestBrowserThread db_thread_;
333 scoped_ptr<TestingProfile> profile_; 333 scoped_ptr<TestingProfile> profile_;
334 334
335 // To cancel HistoryService tasks. 335 // To cancel HistoryService tasks.
336 CancelableRequestConsumer consumer_; 336 CancelableRequestConsumer consumer_;
337 337
338 // To cancel TopSitesBackend tasks. 338 // To cancel TopSitesBackend tasks.
339 CancelableTaskTracker cancelable_task_tracker_; 339 base::CancelableTaskTracker cancelable_task_tracker_;
340 340
341 DISALLOW_COPY_AND_ASSIGN(TopSitesImplTest); 341 DISALLOW_COPY_AND_ASSIGN(TopSitesImplTest);
342 }; // Class TopSitesImplTest 342 }; // Class TopSitesImplTest
343 343
344 // Helper function for appending a URL to a vector of "most visited" URLs, 344 // Helper function for appending a URL to a vector of "most visited" URLs,
345 // using the default values for everything but the URL. 345 // using the default values for everything but the URL.
346 static void AppendMostVisitedURL(std::vector<MostVisitedURL>* list, 346 static void AppendMostVisitedURL(std::vector<MostVisitedURL>* list,
347 const GURL& url) { 347 const GURL& url) {
348 MostVisitedURL mv; 348 MostVisitedURL mv;
349 mv.url = url; 349 mv.url = url;
(...skipping 1189 matching lines...) Expand 10 before | Expand all | Expand 10 after
1539 ASSERT_EQ(orig_thumbnail.getSize(), thumbnail.getSize()); 1539 ASSERT_EQ(orig_thumbnail.getSize(), thumbnail.getSize());
1540 orig_thumbnail.lockPixels(); 1540 orig_thumbnail.lockPixels();
1541 thumbnail.lockPixels(); 1541 thumbnail.lockPixels();
1542 EXPECT_EQ(0, memcmp(orig_thumbnail.getPixels(), thumbnail.getPixels(), 1542 EXPECT_EQ(0, memcmp(orig_thumbnail.getPixels(), thumbnail.getPixels(),
1543 orig_thumbnail.getSize())); 1543 orig_thumbnail.getSize()));
1544 thumbnail.unlockPixels(); 1544 thumbnail.unlockPixels();
1545 orig_thumbnail.unlockPixels(); 1545 orig_thumbnail.unlockPixels();
1546 } 1546 }
1547 1547
1548 } // namespace history 1548 } // namespace history
OLDNEW
« no previous file with comments | « chrome/browser/history/top_sites_impl.h ('k') | chrome/browser/icon_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698