Index: chrome/browser/search_engines/template_url_fetcher.cc |
diff --git a/chrome/browser/search_engines/template_url_fetcher.cc b/chrome/browser/search_engines/template_url_fetcher.cc |
index 5823d2fe78e50a318e2958eb11954cef087f94ce..63ae8cc14a6b5c54d7ce5b8426f5ce98083ee3e0 100644 |
--- a/chrome/browser/search_engines/template_url_fetcher.cc |
+++ b/chrome/browser/search_engines/template_url_fetcher.cc |
@@ -276,22 +276,22 @@ void TemplateURLFetcher::ScheduleDownload( |
} |
// Make sure we aren't already downloading this request. |
- for (Requests::iterator i = requests_->begin(); i != requests_->end(); ++i) { |
+ for (Requests::iterator i = requests_.begin(); i != requests_.end(); ++i) { |
if (((*i)->url() == osdd_url) || |
((provider_type == TemplateURLFetcher::AUTODETECTED_PROVIDER) && |
((*i)->keyword() == keyword))) |
return; |
} |
- requests_->push_back( |
+ requests_.push_back( |
new RequestDelegate(this, keyword, osdd_url, favicon_url, web_contents, |
owned_callbacks.release(), provider_type)); |
} |
void TemplateURLFetcher::RequestCompleted(RequestDelegate* request) { |
Requests::iterator i = |
- std::find(requests_->begin(), requests_->end(), request); |
- DCHECK(i != requests_->end()); |
- requests_->erase(i); |
+ std::find(requests_.begin(), requests_.end(), request); |
+ DCHECK(i != requests_.end()); |
+ requests_.weak_erase(i); |
delete request; |
} |