| Index: components/safe_browsing_db/remote_database_manager.cc
|
| diff --git a/components/safe_browsing_db/remote_database_manager.cc b/components/safe_browsing_db/remote_database_manager.cc
|
| index 2def386d5f8b885838ebcc49de2cc136c07e5532..153a4dfb88b47907608d4c2a37a4e5c29fc9cdc1 100644
|
| --- a/components/safe_browsing_db/remote_database_manager.cc
|
| +++ b/components/safe_browsing_db/remote_database_manager.cc
|
| @@ -99,6 +99,10 @@ void RemoteSafeBrowsingDatabaseManager::ClientRequest::OnRequestDone(
|
|
|
| // TODO(nparker): Add more tests for this class
|
| RemoteSafeBrowsingDatabaseManager::RemoteSafeBrowsingDatabaseManager() {
|
| + // Avoid memory allocations growing the underlying vector. Although this
|
| + // usually wastes a bit of memory, it will still be less than the default
|
| + // vector allocation strategy.
|
| + resource_types_to_check_.reserve(content::RESOURCE_TYPE_LAST_TYPE + 1);
|
| // Decide which resource types to check. These two are the minimum.
|
| resource_types_to_check_.insert(content::RESOURCE_TYPE_MAIN_FRAME);
|
| resource_types_to_check_.insert(content::RESOURCE_TYPE_SUB_FRAME);
|
|
|