Index: ui/base/win/scoped_ole_initializer.cc |
diff --git a/ui/base/win/scoped_ole_initializer.cc b/ui/base/win/scoped_ole_initializer.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..8dab498eb0f713a28a67c575ee97ed1f6acaace0 |
--- /dev/null |
+++ b/ui/base/win/scoped_ole_initializer.cc |
@@ -0,0 +1,22 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "ui/base/win/scoped_ole_initializer.h" |
+ |
+#include <ole2.h> |
+ |
+#include "base/logging.h" |
+ |
+namespace ui { |
+ |
+ScopedOleInitializer::ScopedOleInitializer() { |
+ HRESULT result = OleInitialize(NULL); |
+ DCHECK(SUCCEEDED(result)); |
+} |
+ |
+ScopedOleInitializer::~ScopedOleInitializer() { |
+ OleUninitialize(); |
+} |
+ |
+} // namespace ui |