Chromium Code Reviews| Index: components/history/core/browser/web_history_service.h |
| diff --git a/components/history/core/browser/web_history_service.h b/components/history/core/browser/web_history_service.h |
| index d5681a8d0f5db7dd9cab9d7e3091fd8d0704e021..992fafa0bf2ba5e5bc5b2581988038c1efd13bdf 100644 |
| --- a/components/history/core/browser/web_history_service.h |
| +++ b/components/history/core/browser/web_history_service.h |
| @@ -7,7 +7,8 @@ |
| #include <stddef.h> |
| -#include <set> |
| +#include <map> |
| +#include <memory> |
| #include <string> |
| #include <vector> |
| @@ -212,18 +213,20 @@ class WebHistoryService : public KeyedService { |
| // Pending expiration requests to be canceled if not complete by profile |
| // shutdown. |
| - std::set<Request*> pending_expire_requests_; |
| + std::map<Request*, std::unique_ptr<Request>> pending_expire_requests_; |
|
sky
2016/10/24 16:04:10
Using a map purely for the ownership is bizarre. C
Avi (use Gerrit)
2016/10/24 16:09:01
It's not about comparison functions.
In general,
sky
2016/10/24 16:40:07
I was hoping a comparison function would give the
Avi (use Gerrit)
2016/10/24 17:05:34
There was a thread on cxx (https://groups.google.c
|
| // Pending requests to be canceled if not complete by profile shutdown. |
| - std::set<Request*> pending_audio_history_requests_; |
| + std::map<Request*, std::unique_ptr<Request>> pending_audio_history_requests_; |
| // Pending web and app activity queries to be canceled if not complete by |
| // profile shutdown. |
| - std::set<Request*> pending_web_and_app_activity_requests_; |
| + std::map<Request*, std::unique_ptr<Request>> |
| + pending_web_and_app_activity_requests_; |
| // Pending queries for other forms of browsing history to be canceled if not |
| // complete by profile shutdown. |
| - std::set<Request*> pending_other_forms_of_browsing_history_requests_; |
| + std::map<Request*, std::unique_ptr<Request>> |
| + pending_other_forms_of_browsing_history_requests_; |
| // Observers. |
| base::ObserverList<WebHistoryServiceObserver, true> observer_list_; |