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

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

Issue 10031028: Single URL Expires Were Not Being Deleted. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 | Annotate | Revision Log
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 "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
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 for (size_t i = 0; i < dependencies->deleted_urls.size(); i++) 362 deleted_details->rows = dependencies->deleted_urls;
363 deleted_details->urls.insert(dependencies->deleted_urls[i].url());
364 delegate_->BroadcastNotifications( 363 delegate_->BroadcastNotifications(
365 chrome::NOTIFICATION_HISTORY_URLS_DELETED, deleted_details); 364 chrome::NOTIFICATION_HISTORY_URLS_DELETED, deleted_details);
366 } 365 }
367 } 366 }
368 367
369 void ExpireHistoryBackend::DeleteVisitRelatedInfo( 368 void ExpireHistoryBackend::DeleteVisitRelatedInfo(
370 const VisitVector& visits, 369 const VisitVector& visits,
371 DeleteDependencies* dependencies) { 370 DeleteDependencies* dependencies) {
372 for (size_t i = 0; i < visits.size(); i++) { 371 for (size_t i = 0; i < visits.size(); i++) {
373 // Delete the visit itself. 372 // Delete the visit itself.
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
715 // We use the bookmark service to determine if a URL is bookmarked. The 714 // 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 715 // 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 716 // time we get here. We therefor block until the bookmarks have finished
718 // loading. 717 // loading.
719 if (bookmark_service_) 718 if (bookmark_service_)
720 bookmark_service_->BlockTillLoaded(); 719 bookmark_service_->BlockTillLoaded();
721 return bookmark_service_; 720 return bookmark_service_;
722 } 721 }
723 722
724 } // namespace history 723 } // namespace history
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698