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

Side by Side Diff: components/history/core/browser/expire_history_backend_unittest.cc

Issue 1662843002: Revert of Delete base/prefs and update callers to use components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « components/history/DEPS ('k') | components/history/core/browser/history_backend_unittest.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 "components/history/core/browser/expire_history_backend.h" 5 #include "components/history/core/browser/expire_history_backend.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <string> 10 #include <string>
11 #include <utility> 11 #include <utility>
12 12
13 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "base/files/file_path.h" 14 #include "base/files/file_path.h"
15 #include "base/files/file_util.h" 15 #include "base/files/file_util.h"
16 #include "base/files/scoped_temp_dir.h" 16 #include "base/files/scoped_temp_dir.h"
17 #include "base/macros.h" 17 #include "base/macros.h"
18 #include "base/memory/scoped_ptr.h" 18 #include "base/memory/scoped_ptr.h"
19 #include "base/message_loop/message_loop.h" 19 #include "base/message_loop/message_loop.h"
20 #include "base/prefs/pref_registry_simple.h"
21 #include "base/prefs/testing_pref_service.h"
20 #include "base/scoped_observer.h" 22 #include "base/scoped_observer.h"
21 #include "base/strings/string16.h" 23 #include "base/strings/string16.h"
22 #include "base/strings/utf_string_conversions.h" 24 #include "base/strings/utf_string_conversions.h"
23 #include "components/history/core/browser/history_backend_client.h" 25 #include "components/history/core/browser/history_backend_client.h"
24 #include "components/history/core/browser/history_backend_notifier.h" 26 #include "components/history/core/browser/history_backend_notifier.h"
25 #include "components/history/core/browser/history_constants.h" 27 #include "components/history/core/browser/history_constants.h"
26 #include "components/history/core/browser/history_database.h" 28 #include "components/history/core/browser/history_database.h"
27 #include "components/history/core/browser/thumbnail_database.h" 29 #include "components/history/core/browser/thumbnail_database.h"
28 #include "components/history/core/browser/top_sites.h" 30 #include "components/history/core/browser/top_sites.h"
29 #include "components/history/core/browser/top_sites_impl.h" 31 #include "components/history/core/browser/top_sites_impl.h"
30 #include "components/history/core/browser/top_sites_observer.h" 32 #include "components/history/core/browser/top_sites_observer.h"
31 #include "components/history/core/common/thumbnail_score.h" 33 #include "components/history/core/common/thumbnail_score.h"
32 #include "components/history/core/test/history_client_fake_bookmarks.h" 34 #include "components/history/core/test/history_client_fake_bookmarks.h"
33 #include "components/history/core/test/test_history_database.h" 35 #include "components/history/core/test/test_history_database.h"
34 #include "components/history/core/test/thumbnail.h" 36 #include "components/history/core/test/thumbnail.h"
35 #include "components/history/core/test/wait_top_sites_loaded_observer.h" 37 #include "components/history/core/test/wait_top_sites_loaded_observer.h"
36 #include "components/prefs/pref_registry_simple.h"
37 #include "components/prefs/testing_pref_service.h"
38 #include "testing/gtest/include/gtest/gtest.h" 38 #include "testing/gtest/include/gtest/gtest.h"
39 39
40 // The test must be in the history namespace for the gtest forward declarations 40 // The test must be in the history namespace for the gtest forward declarations
41 // to work. It also eliminates a bunch of ugly "history::". 41 // to work. It also eliminates a bunch of ugly "history::".
42 namespace history { 42 namespace history {
43 43
44 namespace { 44 namespace {
45 // Returns whether |url| can be added to history. 45 // Returns whether |url| can be added to history.
46 bool MockCanAddURLToHistory(const GURL& url) { 46 bool MockCanAddURLToHistory(const GURL& url) {
47 return url.is_valid(); 47 return url.is_valid();
(...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 EXPECT_TRUE(all->Read(now, main_db_.get(), &visits, 1)); 888 EXPECT_TRUE(all->Read(now, main_db_.get(), &visits, 1));
889 EXPECT_EQ(1U, visits.size()); 889 EXPECT_EQ(1U, visits.size());
890 } 890 }
891 891
892 // TODO(brettw) add some visits with no URL to make sure everything is updated 892 // TODO(brettw) add some visits with no URL to make sure everything is updated
893 // properly. Have the visits also refer to nonexistent FTS rows. 893 // properly. Have the visits also refer to nonexistent FTS rows.
894 // 894 //
895 // Maybe also refer to invalid favicons. 895 // Maybe also refer to invalid favicons.
896 896
897 } // namespace history 897 } // namespace history
OLDNEW
« no previous file with comments | « components/history/DEPS ('k') | components/history/core/browser/history_backend_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698