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

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

Issue 870063002: Componentize TopSites, TopSitesBackend, TopSitesDatabase (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@815983002
Patch Set: 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
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 <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"
11 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
12 #include "base/files/file_util.h" 12 #include "base/files/file_util.h"
13 #include "base/files/scoped_temp_dir.h" 13 #include "base/files/scoped_temp_dir.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/stl_util.h" 15 #include "base/stl_util.h"
16 #include "base/strings/string16.h" 16 #include "base/strings/string16.h"
17 #include "base/strings/utf_string_conversions.h" 17 #include "base/strings/utf_string_conversions.h"
18 #include "chrome/browser/history/expire_history_backend.h" 18 #include "chrome/browser/history/expire_history_backend.h"
19 #include "chrome/browser/history/history_details.h" 19 #include "chrome/browser/history/history_details.h"
20 #include "chrome/browser/history/top_sites.h"
21 #include "chrome/browser/history/top_sites_factory.h" 20 #include "chrome/browser/history/top_sites_factory.h"
22 #include "chrome/test/base/testing_profile.h" 21 #include "chrome/test/base/testing_profile.h"
23 #include "chrome/tools/profiles/thumbnail-inl.h"
24 #include "components/history/core/browser/history_backend_notifier.h" 22 #include "components/history/core/browser/history_backend_notifier.h"
25 #include "components/history/core/browser/history_database.h" 23 #include "components/history/core/browser/history_database.h"
26 #include "components/history/core/browser/thumbnail_database.h" 24 #include "components/history/core/browser/thumbnail_database.h"
25 #include "components/history/core/browser/top_sites.h"
27 #include "components/history/core/common/thumbnail_score.h" 26 #include "components/history/core/common/thumbnail_score.h"
28 #include "components/history/core/test/history_client_fake_bookmarks.h" 27 #include "components/history/core/test/history_client_fake_bookmarks.h"
29 #include "components/history/core/test/test_history_database.h" 28 #include "components/history/core/test/test_history_database.h"
29 #include "components/history/core/test/thumbnail-inl.h"
30 #include "content/public/test/test_browser_thread.h" 30 #include "content/public/test/test_browser_thread.h"
31 #include "testing/gtest/include/gtest/gtest.h" 31 #include "testing/gtest/include/gtest/gtest.h"
32 #include "third_party/skia/include/core/SkBitmap.h" 32 #include "third_party/skia/include/core/SkBitmap.h"
33 #include "ui/gfx/codec/jpeg_codec.h" 33 #include "ui/gfx/codec/jpeg_codec.h"
34 34
35 using base::Time; 35 using base::Time;
36 using base::TimeDelta; 36 using base::TimeDelta;
37 using base::TimeTicks; 37 using base::TimeTicks;
38 using content::BrowserThread; 38 using content::BrowserThread;
39 39
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 EXPECT_TRUE(all->Read(now, main_db_.get(), &visits, 1)); 877 EXPECT_TRUE(all->Read(now, main_db_.get(), &visits, 1));
878 EXPECT_EQ(1U, visits.size()); 878 EXPECT_EQ(1U, visits.size());
879 } 879 }
880 880
881 // TODO(brettw) add some visits with no URL to make sure everything is updated 881 // TODO(brettw) add some visits with no URL to make sure everything is updated
882 // properly. Have the visits also refer to nonexistent FTS rows. 882 // properly. Have the visits also refer to nonexistent FTS rows.
883 // 883 //
884 // Maybe also refer to invalid favicons. 884 // Maybe also refer to invalid favicons.
885 885
886 } // namespace history 886 } // namespace history
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698