Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Unified Diff: ui/base/win/scoped_ole_initializer.cc

Issue 9664069: Move scoped_ole_initializer.h to ui/base/win and clean up ole initialization/uninitialization. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/base/win/scoped_ole_initializer.h ('k') | ui/ui.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « ui/base/win/scoped_ole_initializer.h ('k') | ui/ui.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698