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

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

Issue 8275004: Revert 105300 - HQP Refactoring (in Preparation for SQLite Cache) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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 | 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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 334
335 void ExpireHistoryBackend::BroadcastDeleteNotifications( 335 void ExpireHistoryBackend::BroadcastDeleteNotifications(
336 DeleteDependencies* dependencies) { 336 DeleteDependencies* dependencies) {
337 if (!dependencies->deleted_urls.empty()) { 337 if (!dependencies->deleted_urls.empty()) {
338 // Broadcast the URL deleted notification. Note that we also broadcast when 338 // Broadcast the URL deleted notification. Note that we also broadcast when
339 // we were requested to delete everything even if that was a NOP, since 339 // we were requested to delete everything even if that was a NOP, since
340 // some components care to know when history is deleted (it's up to them to 340 // some components care to know when history is deleted (it's up to them to
341 // determine if they care whether anything was deleted). 341 // determine if they care whether anything was deleted).
342 URLsDeletedDetails* deleted_details = new URLsDeletedDetails; 342 URLsDeletedDetails* deleted_details = new URLsDeletedDetails;
343 deleted_details->all_history = false; 343 deleted_details->all_history = false;
344 std::vector<URLRow> typed_urls_changed; // Collect this for later.
344 for (size_t i = 0; i < dependencies->deleted_urls.size(); i++) { 345 for (size_t i = 0; i < dependencies->deleted_urls.size(); i++) {
345 deleted_details->rows.push_back(dependencies->deleted_urls[i]);
346 deleted_details->urls.insert(dependencies->deleted_urls[i].url()); 346 deleted_details->urls.insert(dependencies->deleted_urls[i].url());
347 if (dependencies->deleted_urls[i].typed_count() > 0)
348 typed_urls_changed.push_back(dependencies->deleted_urls[i]);
347 } 349 }
348 delegate_->BroadcastNotifications( 350 delegate_->BroadcastNotifications(
349 chrome::NOTIFICATION_HISTORY_URLS_DELETED, deleted_details); 351 chrome::NOTIFICATION_HISTORY_URLS_DELETED, deleted_details);
350 } 352 }
351 } 353 }
352 354
353 void ExpireHistoryBackend::DeleteVisitRelatedInfo( 355 void ExpireHistoryBackend::DeleteVisitRelatedInfo(
354 const VisitVector& visits, 356 const VisitVector& visits,
355 DeleteDependencies* dependencies) { 357 DeleteDependencies* dependencies) {
356 for (size_t i = 0; i < visits.size(); i++) { 358 for (size_t i = 0; i < visits.size(); i++) {
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 // We use the bookmark service to determine if a URL is bookmarked. The 701 // We use the bookmark service to determine if a URL is bookmarked. The
700 // bookmark service is loaded on a separate thread and may not be done by the 702 // bookmark service is loaded on a separate thread and may not be done by the
701 // time we get here. We therefor block until the bookmarks have finished 703 // time we get here. We therefor block until the bookmarks have finished
702 // loading. 704 // loading.
703 if (bookmark_service_) 705 if (bookmark_service_)
704 bookmark_service_->BlockTillLoaded(); 706 bookmark_service_->BlockTillLoaded();
705 return bookmark_service_; 707 return bookmark_service_;
706 } 708 }
707 709
708 } // namespace history 710 } // namespace history
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/history_quick_provider_unittest.cc ('k') | chrome/browser/history/history.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698