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

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

Issue 1081923002: Remove PrerenderLocalPredictor, part 5. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prerender-local-predictor-4
Patch Set: 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 "components/history/core/browser/history_backend.h" 5 #include "components/history/core/browser/history_backend.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 114
115 // This must be a separate object since HistoryBackend manages its lifetime. 115 // This must be a separate object since HistoryBackend manages its lifetime.
116 // This just forwards the messages we're interested in to the test object. 116 // This just forwards the messages we're interested in to the test object.
117 class HistoryBackendTestDelegate : public HistoryBackend::Delegate { 117 class HistoryBackendTestDelegate : public HistoryBackend::Delegate {
118 public: 118 public:
119 explicit HistoryBackendTestDelegate(HistoryBackendTestBase* test) 119 explicit HistoryBackendTestDelegate(HistoryBackendTestBase* test)
120 : test_(test) {} 120 : test_(test) {}
121 121
122 void NotifyProfileError(sql::InitStatus init_status) override {} 122 void NotifyProfileError(sql::InitStatus init_status) override {}
123 void SetInMemoryBackend(scoped_ptr<InMemoryHistoryBackend> backend) override; 123 void SetInMemoryBackend(scoped_ptr<InMemoryHistoryBackend> backend) override;
124 void NotifyAddVisit(const BriefVisitInfo& info) override {}
125 void NotifyFaviconChanged(const std::set<GURL>& urls) override; 124 void NotifyFaviconChanged(const std::set<GURL>& urls) override;
126 void NotifyURLVisited(ui::PageTransition transition, 125 void NotifyURLVisited(ui::PageTransition transition,
127 const URLRow& row, 126 const URLRow& row,
128 const RedirectList& redirects, 127 const RedirectList& redirects,
129 base::Time visit_time) override; 128 base::Time visit_time) override;
130 void NotifyURLsModified(const URLRows& changed_urls) override; 129 void NotifyURLsModified(const URLRows& changed_urls) override;
131 void NotifyURLsDeleted(bool all_history, 130 void NotifyURLsDeleted(bool all_history,
132 bool expired, 131 bool expired,
133 const URLRows& deleted_rows, 132 const URLRows& deleted_rows,
134 const std::set<GURL>& favicon_urls) override; 133 const std::set<GURL>& favicon_urls) override;
(...skipping 3198 matching lines...) Expand 10 before | Expand all | Expand 10 after
3333 // Verify that the second term is no longer returned as result, and also check 3332 // Verify that the second term is no longer returned as result, and also check
3334 // at the low level that it is gone for good. The term corresponding to the 3333 // at the low level that it is gone for good. The term corresponding to the
3335 // first URLRow should not be affected. 3334 // first URLRow should not be affected.
3336 EXPECT_EQ(1u, GetNumberOfMatchingSearchTerms(kTestKeywordId, term1)); 3335 EXPECT_EQ(1u, GetNumberOfMatchingSearchTerms(kTestKeywordId, term1));
3337 EXPECT_EQ(0u, GetNumberOfMatchingSearchTerms(kTestKeywordId, term2)); 3336 EXPECT_EQ(0u, GetNumberOfMatchingSearchTerms(kTestKeywordId, term2));
3338 EXPECT_TRUE(mem_backend_->db()->GetKeywordSearchTermRow(row1.id(), NULL)); 3337 EXPECT_TRUE(mem_backend_->db()->GetKeywordSearchTermRow(row1.id(), NULL));
3339 EXPECT_FALSE(mem_backend_->db()->GetKeywordSearchTermRow(row2.id(), NULL)); 3338 EXPECT_FALSE(mem_backend_->db()->GetKeywordSearchTermRow(row2.id(), NULL));
3340 } 3339 }
3341 3340
3342 } // namespace history 3341 } // namespace history
OLDNEW
« no previous file with comments | « chrome/browser/history/android/android_provider_backend_unittest.cc ('k') | chrome/browser/history/history_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698