Chromium Code Reviews| 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 "chrome/browser/history/expire_history_backend.h" | 5 #include "chrome/browser/history/expire_history_backend.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 352 | 352 |
| 353 void ExpireHistoryBackend::BroadcastDeleteNotifications( | 353 void ExpireHistoryBackend::BroadcastDeleteNotifications( |
| 354 DeleteDependencies* dependencies) { | 354 DeleteDependencies* dependencies) { |
| 355 if (!dependencies->deleted_urls.empty()) { | 355 if (!dependencies->deleted_urls.empty()) { |
| 356 // Broadcast the URL deleted notification. Note that we also broadcast when | 356 // Broadcast the URL deleted notification. Note that we also broadcast when |
| 357 // we were requested to delete everything even if that was a NOP, since | 357 // we were requested to delete everything even if that was a NOP, since |
| 358 // some components care to know when history is deleted (it's up to them to | 358 // some components care to know when history is deleted (it's up to them to |
| 359 // determine if they care whether anything was deleted). | 359 // determine if they care whether anything was deleted). |
| 360 URLsDeletedDetails* deleted_details = new URLsDeletedDetails; | 360 URLsDeletedDetails* deleted_details = new URLsDeletedDetails; |
| 361 deleted_details->all_history = false; | 361 deleted_details->all_history = false; |
| 362 deleted_details->rows = dependencies->deleted_urls; | |
|
sky
2012/04/12 20:54:10
Why do we need both? If we're providing rows can't
| |
| 363 // Build a set of the URLs for those of our clients who prefer only URLs. | |
| 362 for (size_t i = 0; i < dependencies->deleted_urls.size(); i++) | 364 for (size_t i = 0; i < dependencies->deleted_urls.size(); i++) |
| 363 deleted_details->urls.insert(dependencies->deleted_urls[i].url()); | 365 deleted_details->urls.insert(dependencies->deleted_urls[i].url()); |
| 364 delegate_->BroadcastNotifications( | 366 delegate_->BroadcastNotifications( |
| 365 chrome::NOTIFICATION_HISTORY_URLS_DELETED, deleted_details); | 367 chrome::NOTIFICATION_HISTORY_URLS_DELETED, deleted_details); |
| 366 } | 368 } |
| 367 } | 369 } |
| 368 | 370 |
| 369 void ExpireHistoryBackend::DeleteVisitRelatedInfo( | 371 void ExpireHistoryBackend::DeleteVisitRelatedInfo( |
| 370 const VisitVector& visits, | 372 const VisitVector& visits, |
| 371 DeleteDependencies* dependencies) { | 373 DeleteDependencies* dependencies) { |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 715 // We use the bookmark service to determine if a URL is bookmarked. The | 717 // We use the bookmark service to determine if a URL is bookmarked. The |
| 716 // bookmark service is loaded on a separate thread and may not be done by the | 718 // bookmark service is loaded on a separate thread and may not be done by the |
| 717 // time we get here. We therefor block until the bookmarks have finished | 719 // time we get here. We therefor block until the bookmarks have finished |
| 718 // loading. | 720 // loading. |
| 719 if (bookmark_service_) | 721 if (bookmark_service_) |
| 720 bookmark_service_->BlockTillLoaded(); | 722 bookmark_service_->BlockTillLoaded(); |
| 721 return bookmark_service_; | 723 return bookmark_service_; |
| 722 } | 724 } |
| 723 | 725 |
| 724 } // namespace history | 726 } // namespace history |
| OLD | NEW |