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

Unified Diff: base/win/scoped_com_initializer.h

Issue 7265009: Revert 90464 - Move app/win/* files to base/win/, ui/base/win and chrome/common/ directories. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 6 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 | « base/win/iat_patch_function.cc ('k') | chrome/browser/aeropeek_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/win/scoped_com_initializer.h
===================================================================
--- base/win/scoped_com_initializer.h (revision 90470)
+++ base/win/scoped_com_initializer.h (working copy)
@@ -1,60 +0,0 @@
-// Copyright (c) 2011 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.
-
-#ifndef BASE_WIN_SCOPED_COM_INITIALIZER_H_
-#define BASE_WIN_SCOPED_COM_INITIALIZER_H_
-#pragma once
-
-#include "base/basictypes.h"
-#include "build/build_config.h"
-
-#if defined(OS_WIN)
-
-#include <objbase.h>
-
-namespace base {
-namespace win {
-
-// Initializes COM in the constructor (STA), and uninitializes COM in the
-// destructor.
-class ScopedCOMInitializer {
- public:
- ScopedCOMInitializer() : hr_(CoInitialize(NULL)) {
- }
-
- ScopedCOMInitializer::~ScopedCOMInitializer() {
- if (SUCCEEDED(hr_))
- CoUninitialize();
- }
-
- private:
- HRESULT hr_;
-
- DISALLOW_COPY_AND_ASSIGN(ScopedCOMInitializer);
-};
-
-} // namespace win
-} // namespace base
-
-#else
-
-namespace base {
-namespace win {
-
-// Do-nothing class for other platforms.
-class ScopedCOMInitializer {
- public:
- ScopedCOMInitializer() {}
- ~ScopedCOMInitializer() {}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ScopedCOMInitializer);
-};
-
-} // namespace win
-} // namespace base
-
-#endif
-
-#endif // BASE_WIN_SCOPED_COM_INITIALIZER_H_
« no previous file with comments | « base/win/iat_patch_function.cc ('k') | chrome/browser/aeropeek_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698