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

Unified Diff: base/win/scoped_propvariant.h

Issue 1446363003: Deleted OS_WIN and all Windows specific files from base. (Closed) Base URL: https://github.com/domokit/mojo.git@base_tests
Patch Set: Created 5 years, 1 month 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/scoped_process_information_unittest.cc ('k') | base/win/scoped_select_object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/win/scoped_propvariant.h
diff --git a/base/win/scoped_propvariant.h b/base/win/scoped_propvariant.h
deleted file mode 100644
index 62cc6a6d15273eb1a7eb93bc61b493d1ae3f2580..0000000000000000000000000000000000000000
--- a/base/win/scoped_propvariant.h
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright (c) 2013 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_PROPVARIANT_H_
-#define BASE_WIN_SCOPED_PROPVARIANT_H_
-
-#include <propidl.h>
-
-#include "base/basictypes.h"
-#include "base/logging.h"
-
-namespace base {
-namespace win {
-
-// A PROPVARIANT that is automatically initialized and cleared upon respective
-// construction and destruction of this class.
-class ScopedPropVariant {
- public:
- ScopedPropVariant() {
- PropVariantInit(&pv_);
- }
-
- ~ScopedPropVariant() {
- Reset();
- }
-
- // Returns a pointer to the underlying PROPVARIANT for use as an out param in
- // a function call.
- PROPVARIANT* Receive() {
- DCHECK_EQ(pv_.vt, VT_EMPTY);
- return &pv_;
- }
-
- // Clears the instance to prepare it for re-use (e.g., via Receive).
- void Reset() {
- if (pv_.vt != VT_EMPTY) {
- HRESULT result = PropVariantClear(&pv_);
- DCHECK_EQ(result, S_OK);
- }
- }
-
- const PROPVARIANT& get() const { return pv_; }
- const PROPVARIANT* ptr() const { return &pv_; }
-
- private:
- PROPVARIANT pv_;
-
- // Comparison operators for ScopedPropVariant are not supported at this point.
- bool operator==(const ScopedPropVariant&) const;
- bool operator!=(const ScopedPropVariant&) const;
- DISALLOW_COPY_AND_ASSIGN(ScopedPropVariant);
-};
-
-} // namespace win
-} // namespace base
-
-#endif // BASE_WIN_SCOPED_PROPVARIANT_H_
« no previous file with comments | « base/win/scoped_process_information_unittest.cc ('k') | base/win/scoped_select_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698