Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/browser_process_sub_thread.h" | 5 #include "chrome/browser/browser_process_sub_thread.h" |
| 6 #include "build/build_config.h" | 6 #include "build/build_config.h" |
| 7 #include "chrome/common/notification_service.h" | 7 #include "chrome/common/notification_service.h" |
| 8 | 8 |
| 9 #if defined(OS_WIN) | 9 #if defined(OS_WIN) |
| 10 #include <Objbase.h> | 10 #include <Objbase.h> |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 21 | 21 |
| 22 void BrowserProcessSubThread::Init() { | 22 void BrowserProcessSubThread::Init() { |
| 23 #if defined(OS_WIN) | 23 #if defined(OS_WIN) |
| 24 // Initializes the COM library on the current thread. | 24 // Initializes the COM library on the current thread. |
| 25 CoInitialize(NULL); | 25 CoInitialize(NULL); |
| 26 #endif | 26 #endif |
| 27 | 27 |
| 28 notification_service_ = new NotificationService; | 28 notification_service_ = new NotificationService; |
| 29 } | 29 } |
| 30 | 30 |
| 31 void BrowserProcessSubThread::CleanUpAfterMessageLoopDestruction() { | 31 void BrowserProcessSubThread::CleanUp() { |
| 32 delete notification_service_; | 32 delete notification_service_; |
|
eroman
2011/03/02 02:23:31
hopefully there aren't any destruction observers t
| |
| 33 notification_service_ = NULL; | 33 notification_service_ = NULL; |
| 34 | 34 |
| 35 #if defined(OS_WIN) | 35 #if defined(OS_WIN) |
| 36 // Closes the COM library on the current thread. CoInitialize must | 36 // Closes the COM library on the current thread. CoInitialize must |
| 37 // be balanced by a corresponding call to CoUninitialize. | 37 // be balanced by a corresponding call to CoUninitialize. |
| 38 CoUninitialize(); | 38 CoUninitialize(); |
| 39 #endif | 39 #endif |
| 40 } | 40 } |
| OLD | NEW |