Chromium Code Reviews| Index: components/safe_browsing_db/v4_get_hash_protocol_manager.cc |
| diff --git a/components/safe_browsing_db/v4_get_hash_protocol_manager.cc b/components/safe_browsing_db/v4_get_hash_protocol_manager.cc |
| index 2f050a7247b07dcda1260f34d8efd961c8f1c735..6131566dbe6c54dcbe98579ff21cb364ef26355d 100644 |
| --- a/components/safe_browsing_db/v4_get_hash_protocol_manager.cc |
| +++ b/components/safe_browsing_db/v4_get_hash_protocol_manager.cc |
| @@ -122,6 +122,14 @@ V4GetHashProtocolManager::~V4GetHashProtocolManager() { |
| hash_requests_.clear(); |
| } |
| +// static |
| +void V4GetHashProtocolManager::RegisterFactory( |
| + std::unique_ptr<V4GetHashProtocolManagerFactory> factory) { |
| + if (factory_) |
| + delete factory_; |
| + factory_ = factory.release(); |
|
mattm
2016/05/02 22:36:53
If you do switch to passing in a unique_ptr, why n
Reilly Grant (use Gerrit)
2016/05/02 22:55:27
factory_ is a global variable. It must be a primit
|
| +} |
| + |
| std::string V4GetHashProtocolManager::GetHashRequest( |
| const std::vector<SBPrefix>& prefixes, |
| const std::vector<PlatformType>& platforms, |