Chromium Code Reviews| Index: chrome/browser/process_singleton_win.cc |
| =================================================================== |
| --- chrome/browser/process_singleton_win.cc (revision 141718) |
| +++ chrome/browser/process_singleton_win.cc (working copy) |
| @@ -200,6 +200,8 @@ |
| ProcessSingleton::~ProcessSingleton() { |
| Cleanup(); |
|
Jói
2012/06/15 10:04:57
nit: since Cleanup() is a no-op now, you could rem
|
| + // Make sure we unregister the window class during normal shutdown as well. |
| + UnregisterWindowClass(); |
| } |
| ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() { |
| @@ -302,12 +304,11 @@ |
| } |
| void ProcessSingleton::Cleanup() { |
| +} |
| + |
| +void ProcessSingleton::UnregisterWindowClass() { |
| // Window classes registered by DLLs are not cleaned up automatically on |
| // process exit, so we must unregister at the earliest chance possible. |
| - // During the fast shutdown sequence, ProcessSingleton::Cleanup() is |
| - // called if our process was the first to start. Therefore we try cleaning |
| - // up here, and again in the destructor if needed to catch as many cases |
| - // as possible. |
| if (window_) { |
| ::DestroyWindow(window_); |
| ::UnregisterClass(chrome::kMessageWindowClass, |