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

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

Issue 8451009: HQP Refactoring (in Preparation for SQLite Cache) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 344
345 void ExpireHistoryBackend::BroadcastDeleteNotifications( 345 void ExpireHistoryBackend::BroadcastDeleteNotifications(
346 DeleteDependencies* dependencies) { 346 DeleteDependencies* dependencies) {
347 if (!dependencies->deleted_urls.empty()) { 347 if (!dependencies->deleted_urls.empty()) {
348 // Broadcast the URL deleted notification. Note that we also broadcast when 348 // Broadcast the URL deleted notification. Note that we also broadcast when
349 // we were requested to delete everything even if that was a NOP, since 349 // we were requested to delete everything even if that was a NOP, since
350 // some components care to know when history is deleted (it's up to them to 350 // some components care to know when history is deleted (it's up to them to
351 // determine if they care whether anything was deleted). 351 // determine if they care whether anything was deleted).
352 URLsDeletedDetails* deleted_details = new URLsDeletedDetails; 352 URLsDeletedDetails* deleted_details = new URLsDeletedDetails;
353 deleted_details->all_history = false; 353 deleted_details->all_history = false;
354 for (size_t i = 0; i < dependencies->deleted_urls.size(); i++) 354 for (size_t i = 0; i < dependencies->deleted_urls.size(); i++) {
355 deleted_details->rows.push_back(dependencies->deleted_urls[i]);
355 deleted_details->urls.insert(dependencies->deleted_urls[i].url()); 356 deleted_details->urls.insert(dependencies->deleted_urls[i].url());
357 }
356 delegate_->BroadcastNotifications( 358 delegate_->BroadcastNotifications(
357 chrome::NOTIFICATION_HISTORY_URLS_DELETED, deleted_details); 359 chrome::NOTIFICATION_HISTORY_URLS_DELETED, deleted_details);
358 } 360 }
359 } 361 }
360 362
361 void ExpireHistoryBackend::DeleteVisitRelatedInfo( 363 void ExpireHistoryBackend::DeleteVisitRelatedInfo(
362 const VisitVector& visits, 364 const VisitVector& visits,
363 DeleteDependencies* dependencies) { 365 DeleteDependencies* dependencies) {
364 for (size_t i = 0; i < visits.size(); i++) { 366 for (size_t i = 0; i < visits.size(); i++) {
365 // Delete the visit itself. 367 // Delete the visit itself.
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 // We use the bookmark service to determine if a URL is bookmarked. The 709 // We use the bookmark service to determine if a URL is bookmarked. The
708 // bookmark service is loaded on a separate thread and may not be done by the 710 // bookmark service is loaded on a separate thread and may not be done by the
709 // time we get here. We therefor block until the bookmarks have finished 711 // time we get here. We therefor block until the bookmarks have finished
710 // loading. 712 // loading.
711 if (bookmark_service_) 713 if (bookmark_service_)
712 bookmark_service_->BlockTillLoaded(); 714 bookmark_service_->BlockTillLoaded();
713 return bookmark_service_; 715 return bookmark_service_;
714 } 716 }
715 717
716 } // namespace history 718 } // namespace history
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/history_quick_provider_unittest.cc ('k') | chrome/browser/history/history.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698