OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "content/browser/browser_process_sub_thread.h" | 5 #include "content/browser/browser_process_sub_thread.h" |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 #include "content/browser/notification_service_impl.h" | 8 #include "content/browser/notification_service_impl.h" |
9 | 9 |
10 #if defined(OS_WIN) | 10 #if defined(OS_WIN) |
11 #include <Objbase.h> | 11 #include <Objbase.h> |
12 #endif | 12 #endif |
13 | 13 |
14 namespace content { | 14 namespace content { |
15 | 15 |
16 BrowserProcessSubThread::BrowserProcessSubThread(BrowserThread::ID identifier) | 16 BrowserProcessSubThread::BrowserProcessSubThread(BrowserThread::ID identifier) |
17 : BrowserThreadImpl(identifier) {} | 17 : BrowserThreadImpl(identifier), |
| 18 notification_service_(NULL) { |
| 19 } |
18 | 20 |
19 BrowserProcessSubThread::~BrowserProcessSubThread() { | 21 BrowserProcessSubThread::~BrowserProcessSubThread() { |
20 Stop(); | 22 Stop(); |
21 } | 23 } |
22 | 24 |
23 void BrowserProcessSubThread::Init() { | 25 void BrowserProcessSubThread::Init() { |
24 #if defined(OS_WIN) | 26 #if defined(OS_WIN) |
25 // Initializes the COM library on the current thread. | 27 // Initializes the COM library on the current thread. |
26 CoInitialize(NULL); | 28 CoInitialize(NULL); |
27 #endif | 29 #endif |
(...skipping 10 matching lines...) Expand all Loading... |
38 notification_service_ = NULL; | 40 notification_service_ = NULL; |
39 | 41 |
40 #if defined(OS_WIN) | 42 #if defined(OS_WIN) |
41 // Closes the COM library on the current thread. CoInitialize must | 43 // Closes the COM library on the current thread. CoInitialize must |
42 // be balanced by a corresponding call to CoUninitialize. | 44 // be balanced by a corresponding call to CoUninitialize. |
43 CoUninitialize(); | 45 CoUninitialize(); |
44 #endif | 46 #endif |
45 } | 47 } |
46 | 48 |
47 } // namespace content | 49 } // namespace content |
OLD | NEW |