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

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

Issue 666673010: Standardize usage of virtual/override/final in chrome/browser/history (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 141
142 ClearLastNotifications(); 142 ClearLastNotifications();
143 143
144 expirer_.SetDatabases(NULL, NULL); 144 expirer_.SetDatabases(NULL, NULL);
145 145
146 main_db_.reset(); 146 main_db_.reset();
147 thumb_db_.reset(); 147 thumb_db_.reset();
148 } 148 }
149 149
150 // BroadcastNotificationDelegate: 150 // BroadcastNotificationDelegate:
151 virtual void BroadcastNotifications( 151 void BroadcastNotifications(int type,
152 int type, 152 scoped_ptr<HistoryDetails> details) override {
153 scoped_ptr<HistoryDetails> details) override {
154 // This gets called when there are notifications to broadcast. Instead, we 153 // This gets called when there are notifications to broadcast. Instead, we
155 // store them so we can tell that the correct notifications were sent. 154 // store them so we can tell that the correct notifications were sent.
156 notifications_.push_back(std::make_pair(type, details.release())); 155 notifications_.push_back(std::make_pair(type, details.release()));
157 } 156 }
158 virtual void NotifySyncURLsModified(URLRows* rows) override {} 157 void NotifySyncURLsModified(URLRows* rows) override {}
159 virtual void NotifySyncURLsDeleted(bool all_history, 158 void NotifySyncURLsDeleted(bool all_history,
160 bool expired, 159 bool expired,
161 URLRows* rows) override {} 160 URLRows* rows) override {}
162 }; 161 };
163 162
164 // The example data consists of 4 visits. The middle two visits are to the 163 // The example data consists of 4 visits. The middle two visits are to the
165 // same URL, while the first and last are for unique ones. This allows a test 164 // same URL, while the first and last are for unique ones. This allows a test
166 // for the oldest or newest to include both a URL that should get totally 165 // for the oldest or newest to include both a URL that should get totally
167 // deleted (the one on the end) with one that should only get a visit deleted 166 // deleted (the one on the end) with one that should only get a visit deleted
168 // (with the one in the middle) when it picks the proper threshold time. 167 // (with the one in the middle) when it picks the proper threshold time.
169 // 168 //
170 // Each visit has indexed data, each URL has thumbnail. The first two URLs will 169 // Each visit has indexed data, each URL has thumbnail. The first two URLs will
171 // share the same avicon, while the last one will have a unique favicon. The 170 // share the same avicon, while the last one will have a unique favicon. The
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after
874 EXPECT_TRUE(all->Read(now, main_db_.get(), &visits, 1)); 873 EXPECT_TRUE(all->Read(now, main_db_.get(), &visits, 1));
875 EXPECT_EQ(1U, visits.size()); 874 EXPECT_EQ(1U, visits.size());
876 } 875 }
877 876
878 // TODO(brettw) add some visits with no URL to make sure everything is updated 877 // TODO(brettw) add some visits with no URL to make sure everything is updated
879 // properly. Have the visits also refer to nonexistent FTS rows. 878 // properly. Have the visits also refer to nonexistent FTS rows.
880 // 879 //
881 // Maybe also refer to invalid favicons. 880 // Maybe also refer to invalid favicons.
882 881
883 } // namespace history 882 } // namespace history
OLDNEW
« no previous file with comments | « chrome/browser/history/expire_history_backend.cc ('k') | chrome/browser/history/history_backend.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698