Chromium Code Reviews| Index: chrome/browser/history/history_service.cc |
| diff --git a/chrome/browser/history/history_service.cc b/chrome/browser/history/history_service.cc |
| index 20b90f21b98846c12abfad3a590a2bfc91ee401a..ecd16a93c0581ff29af632603784f4efec036b31 100644 |
| --- a/chrome/browser/history/history_service.cc |
| +++ b/chrome/browser/history/history_service.cc |
| @@ -115,11 +115,11 @@ class URLIteratorFromURLRows |
| }; |
| // Callback from WebHistoryService::ExpireWebHistory(). |
| -void ExpireWebHistoryComplete( |
| - history::WebHistoryService::Request* request, |
| - bool success) { |
| - // Ignore the result and delete the request. |
| - delete request; |
| +void ExpireWebHistoryComplete(bool success) { |
| + // Ignore the result. |
| + // |
| + // TODO(davidben): ExpireLocalAndRemoteHistoryBetween callback should not fire |
| + // until this completes. |
| } |
| } // namespace |
| @@ -1163,14 +1163,12 @@ void HistoryService::ExpireLocalAndRemoteHistoryBetween( |
| // Attempt online deletion from the history server, but ignore the result. |
| // Deletion directives ensure that the results will eventually be deleted. |
| - // Pass ownership of the request to the callback. |
| - scoped_ptr<history::WebHistoryService::Request> request = |
| - web_history->ExpireHistoryBetween( |
| - restrict_urls, begin_time, end_time, |
| - base::Bind(&ExpireWebHistoryComplete)); |
| - |
| - // The request will be freed when the callback is called. |
| - CHECK(request.release()); |
| + // |
| + // TODO(davidben): |callback| should not run until this operation completes |
| + // too. |
| + web_history->ExpireHistoryBetween( |
| + restrict_urls, begin_time, end_time, |
| + base::Bind(&ExpireWebHistoryComplete)); |
|
Patrick Dubroy
2014/02/20 12:56:55
I'd just use base::DoNothing() here.
davidben
2014/02/20 18:08:01
Hrm. Does that work? There's an extra argument to
|
| } |
| ExpireHistoryBetween(restrict_urls, begin_time, end_time, callback, tracker); |
| } |