Chromium Code Reviews| Index: net/base/openssl_private_key_store_android.cc |
| =================================================================== |
| --- net/base/openssl_private_key_store_android.cc (revision 154951) |
| +++ net/base/openssl_private_key_store_android.cc (working copy) |
| @@ -17,6 +17,8 @@ |
| class OpenSSLKeyStoreAndroid : public OpenSSLPrivateKeyStore { |
| public: |
| + typedef LeakySingletonTraits<OpenSSLKeyStoreAndroid> |
| + OpenSSLKeyStoreAndroidLeakyTraits; |
|
Ryan Sleevi
2012/09/06 18:23:35
Sorry, this was my bug in my nit. This doesn't nee
Johnny(Jianning) Ding
2012/09/07 04:33:07
Done.
|
| ~OpenSSLKeyStoreAndroid() {} |
| // TODO(joth): Use the |url| to help identify this key to the user. |
| @@ -47,12 +49,16 @@ |
| } |
| static OpenSSLKeyStoreAndroid* GetInstance() { |
| - return Singleton<OpenSSLKeyStoreAndroid>::get(); |
| + // Leak the OpenSSL key store as it is used from a non-joinable worker |
| + // thread that may still be running at shutdown. |
| + return Singleton< |
| + OpenSSLKeyStoreAndroid, |
| + OpenSSLKeyStoreAndroidLeakyTraits>::get(); |
| } |
| private: |
| + friend struct DefaultSingletonTraits<OpenSSLKeyStoreAndroid>; |
| OpenSSLKeyStoreAndroid() {} |
| - friend struct DefaultSingletonTraits<OpenSSLKeyStoreAndroid>; |
| DISALLOW_COPY_AND_ASSIGN(OpenSSLKeyStoreAndroid); |
| }; |