summaryrefslogtreecommitdiffstats
path: root/chrome/common/win_util.h
diff options
context:
space:
mode:
authortommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-11 20:57:44 +0000
committertommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-11 20:57:44 +0000
commit73ecbbee4f993079a1aab60dfe140effd79f50d8 (patch)
tree9c3c1bad4d4dbd58f86ea7deb43d2d520b1fecff /chrome/common/win_util.h
parentb09e09085f7778d06d4b9ceef1e841d950f69eaa (diff)
downloadchromium_src-73ecbbee4f993079a1aab60dfe140effd79f50d8.zip
chromium_src-73ecbbee4f993079a1aab60dfe140effd79f50d8.tar.gz
chromium_src-73ecbbee4f993079a1aab60dfe140effd79f50d8.tar.bz2
Fixing build break after I moved the meat of ScopedCOMInitializer into the .cc file.
Instead of modifying all of the depending .scons and .vcproj files, I'm just removing the DCHECK() I had added and moving the calls back into the header file where they were to begin with. Review URL: http://codereview.chromium.org/17350 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7861 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/win_util.h')
-rw-r--r--chrome/common/win_util.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/chrome/common/win_util.h b/chrome/common/win_util.h
index 02a8ace..5de3329 100644
--- a/chrome/common/win_util.h
+++ b/chrome/common/win_util.h
@@ -61,8 +61,13 @@ class CoMemReleaser {
// destructor.
class ScopedCOMInitializer {
public:
- ScopedCOMInitializer();
- ~ScopedCOMInitializer();
+ ScopedCOMInitializer() : hr_(CoInitialize(NULL)) {
+ }
+
+ ScopedCOMInitializer::~ScopedCOMInitializer() {
+ if (SUCCEEDED(hr_))
+ CoUninitialize();
+ }
// Returns the error code from CoInitialize(NULL)
// (called in constructor)