summaryrefslogtreecommitdiffstats
path: root/chrome/browser/process_singleton_win.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/process_singleton_win.cc')
-rw-r--r--chrome/browser/process_singleton_win.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/chrome/browser/process_singleton_win.cc b/chrome/browser/process_singleton_win.cc
index 99d2d5f..c34a4d1 100644
--- a/chrome/browser/process_singleton_win.cc
+++ b/chrome/browser/process_singleton_win.cc
@@ -45,8 +45,10 @@ ProcessSingleton::ProcessSingleton(const FilePath& user_data_dir)
}
ProcessSingleton::~ProcessSingleton() {
- if (window_)
+ if (window_) {
DestroyWindow(window_);
+ UnregisterClass(chrome::kMessageWindowClass, GetModuleHandle(NULL));
+ }
}
bool ProcessSingleton::NotifyOtherProcess() {
@@ -142,7 +144,8 @@ void ProcessSingleton::Create() {
wc.lpfnWndProc = ProcessSingleton::WndProcStatic;
wc.hInstance = hinst;
wc.lpszClassName = chrome::kMessageWindowClass;
- RegisterClassEx(&wc);
+ ATOM clazz = RegisterClassEx(&wc);
+ DCHECK(clazz);
std::wstring user_data_dir;
PathService::Get(chrome::DIR_USER_DATA, &user_data_dir);