| OLD | NEW |
| 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 } | 172 } |
| 173 | 173 |
| 174 // BroadcastNotificationDelegate implementation. | 174 // BroadcastNotificationDelegate implementation. |
| 175 virtual void BroadcastNotifications( | 175 virtual void BroadcastNotifications( |
| 176 int type, | 176 int type, |
| 177 HistoryDetails* details_deleted) OVERRIDE { | 177 HistoryDetails* details_deleted) OVERRIDE { |
| 178 // This gets called when there are notifications to broadcast. Instead, we | 178 // This gets called when there are notifications to broadcast. Instead, we |
| 179 // store them so we can tell that the correct notifications were sent. | 179 // store them so we can tell that the correct notifications were sent. |
| 180 notifications_.push_back(std::make_pair(type, details_deleted)); | 180 notifications_.push_back(std::make_pair(type, details_deleted)); |
| 181 } | 181 } |
| 182 virtual void NotifySyncURLsDeleted( |
| 183 bool all_history, |
| 184 bool archived, |
| 185 URLRows* rows) OVERRIDE {} |
| 182 }; | 186 }; |
| 183 | 187 |
| 184 // The example data consists of 4 visits. The middle two visits are to the | 188 // The example data consists of 4 visits. The middle two visits are to the |
| 185 // same URL, while the first and last are for unique ones. This allows a test | 189 // same URL, while the first and last are for unique ones. This allows a test |
| 186 // for the oldest or newest to include both a URL that should get totally | 190 // for the oldest or newest to include both a URL that should get totally |
| 187 // deleted (the one on the end) with one that should only get a visit deleted | 191 // deleted (the one on the end) with one that should only get a visit deleted |
| 188 // (with the one in the middle) when it picks the proper threshold time. | 192 // (with the one in the middle) when it picks the proper threshold time. |
| 189 // | 193 // |
| 190 // Each visit has indexed data, each URL has thumbnail. The first two URLs will | 194 // Each visit has indexed data, each URL has thumbnail. The first two URLs will |
| 191 // share the same favicon, while the last one will have a unique favicon. The | 195 // share the same favicon, while the last one will have a unique favicon. The |
| (...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1021 main_db_->GetVisitsForURL(url_id, &archived_visits); | 1025 main_db_->GetVisitsForURL(url_id, &archived_visits); |
| 1022 EXPECT_EQ(0U, archived_visits.size()); | 1026 EXPECT_EQ(0U, archived_visits.size()); |
| 1023 } | 1027 } |
| 1024 | 1028 |
| 1025 // TODO(brettw) add some visits with no URL to make sure everything is updated | 1029 // TODO(brettw) add some visits with no URL to make sure everything is updated |
| 1026 // properly. Have the visits also refer to nonexistent FTS rows. | 1030 // properly. Have the visits also refer to nonexistent FTS rows. |
| 1027 // | 1031 // |
| 1028 // Maybe also refer to invalid favicons. | 1032 // Maybe also refer to invalid favicons. |
| 1029 | 1033 |
| 1030 } // namespace history | 1034 } // namespace history |
| OLD | NEW |