diff options
-rw-r--r-- | chrome/browser/autocomplete/autocomplete.cc | 2 | ||||
-rw-r--r-- | chrome/browser/autocomplete/history_provider.cc | 11 | ||||
-rw-r--r-- | chrome/browser/autocomplete/history_quick_provider.h | 6 | ||||
-rw-r--r-- | chrome/browser/history/expire_history_backend.cc | 6 | ||||
-rw-r--r-- | content/browser/cancelable_request.h | 4 |
5 files changed, 12 insertions, 17 deletions
diff --git a/chrome/browser/autocomplete/autocomplete.cc b/chrome/browser/autocomplete/autocomplete.cc index b44c7d0..4bba4e6 100644 --- a/chrome/browser/autocomplete/autocomplete.cc +++ b/chrome/browser/autocomplete/autocomplete.cc @@ -531,6 +531,8 @@ void AutocompleteProvider::Stop() { } void AutocompleteProvider::DeleteMatch(const AutocompleteMatch& match) { + DLOG(WARNING) << "The AutocompleteProvider '" << name() + << "' has not implemented DeleteMatch."; } AutocompleteProvider::~AutocompleteProvider() { diff --git a/chrome/browser/autocomplete/history_provider.cc b/chrome/browser/autocomplete/history_provider.cc index 9fe0754..b6fb001 100644 --- a/chrome/browser/autocomplete/history_provider.cc +++ b/chrome/browser/autocomplete/history_provider.cc @@ -31,17 +31,14 @@ void HistoryProvider::DeleteMatch(const AutocompleteMatch& match) { profile_->GetHistoryService(Profile::EXPLICIT_ACCESS); // Delete the match from the history DB. - GURL selected_url(match.destination_url); - if (!history_service || !selected_url.is_valid()) { - NOTREACHED() << "Can't delete requested URL"; - return; - } - history_service->DeleteURL(selected_url); + DCHECK(history_service); + DCHECK(match.destination_url.is_valid()); + history_service->DeleteURL(match.destination_url); // Delete the match from the current set of matches. bool found = false; for (ACMatches::iterator i(matches_.begin()); i != matches_.end(); ++i) { - if (i->destination_url == selected_url && i->type == match.type) { + if (i->destination_url == match.destination_url && i->type == match.type) { found = true; if (i->is_history_what_you_typed_match || i->starred) { // We can't get rid of What-You-Typed or Bookmarked matches, diff --git a/chrome/browser/autocomplete/history_quick_provider.h b/chrome/browser/autocomplete/history_quick_provider.h index 8264669..b14fda4 100644 --- a/chrome/browser/autocomplete/history_quick_provider.h +++ b/chrome/browser/autocomplete/history_quick_provider.h @@ -37,9 +37,6 @@ class HistoryQuickProvider : public HistoryProvider { virtual void DeleteMatch(const AutocompleteMatch& match) OVERRIDE; - // Performs the autocomplete matching and scoring. - void DoAutocomplete(); - // Disable this provider. For unit testing purposes only. This is required // because this provider is closely associated with the HistoryURLProvider // and in order to properly test the latter the HistoryQuickProvider must @@ -52,6 +49,9 @@ class HistoryQuickProvider : public HistoryProvider { FRIEND_TEST_ALL_PREFIXES(HistoryQuickProviderTest, Spans); FRIEND_TEST_ALL_PREFIXES(HistoryQuickProviderTest, Relevance); + // Performs the autocomplete matching and scoring. + void DoAutocomplete(); + // Creates an AutocompleteMatch from |history_match|. |max_match_score| gives // the maximum possible score for the match. |history_matches| is the full set // of matches to compare each match to when calculating confidence. diff --git a/chrome/browser/history/expire_history_backend.cc b/chrome/browser/history/expire_history_backend.cc index 94ed1ff..d6f9fe1 100644 --- a/chrome/browser/history/expire_history_backend.cc +++ b/chrome/browser/history/expire_history_backend.cc @@ -341,12 +341,8 @@ void ExpireHistoryBackend::BroadcastDeleteNotifications( // determine if they care whether anything was deleted). URLsDeletedDetails* deleted_details = new URLsDeletedDetails; deleted_details->all_history = false; - std::vector<URLRow> typed_urls_changed; // Collect this for later. - for (size_t i = 0; i < dependencies->deleted_urls.size(); i++) { + for (size_t i = 0; i < dependencies->deleted_urls.size(); i++) deleted_details->urls.insert(dependencies->deleted_urls[i].url()); - if (dependencies->deleted_urls[i].typed_count() > 0) - typed_urls_changed.push_back(dependencies->deleted_urls[i]); - } delegate_->BroadcastNotifications( chrome::NOTIFICATION_HISTORY_URLS_DELETED, deleted_details); } diff --git a/content/browser/cancelable_request.h b/content/browser/cancelable_request.h index 69080df..9a986d8 100644 --- a/content/browser/cancelable_request.h +++ b/content/browser/cancelable_request.h @@ -4,8 +4,8 @@ // CancelableRequestProviders and Consumers work together to make requests that // execute on a background thread in the provider and return data to the -// consumer. These class collaborate to keep a list of open requests and to -// make sure that requests to not outlive either of the objects involved in the +// consumer. These classes collaborate to keep a list of open requests and to +// make sure that requests do not outlive either of the objects involved in the // transaction. // // If you do not need to return data to the consumer, do not use this system, |