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

Side by Side Diff: base/win/scoped_variant.h

Issue 7461141: Rename BASE_API to BASE_EXPORT. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/win/scoped_bstr.h ('k') | base/win/win_util.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BASE_WIN_SCOPED_VARIANT_H_ 5 #ifndef BASE_WIN_SCOPED_VARIANT_H_
6 #define BASE_WIN_SCOPED_VARIANT_H_ 6 #define BASE_WIN_SCOPED_VARIANT_H_
7 #pragma once 7 #pragma once
8 8
9 #include <windows.h> 9 #include <windows.h>
10 #include <oleauto.h> 10 #include <oleauto.h>
11 11
12 #include "base/base_api.h" 12 #include "base/base_export.h"
13 #include "base/basictypes.h" 13 #include "base/basictypes.h"
14 14
15 namespace base { 15 namespace base {
16 namespace win { 16 namespace win {
17 17
18 // Scoped VARIANT class for automatically freeing a COM VARIANT at the 18 // Scoped VARIANT class for automatically freeing a COM VARIANT at the
19 // end of a scope. Additionally provides a few functions to make the 19 // end of a scope. Additionally provides a few functions to make the
20 // encapsulated VARIANT easier to use. 20 // encapsulated VARIANT easier to use.
21 // Instead of inheriting from VARIANT, we take the containment approach 21 // Instead of inheriting from VARIANT, we take the containment approach
22 // in order to have more control over the usage of the variant and guard 22 // in order to have more control over the usage of the variant and guard
23 // against memory leaks. 23 // against memory leaks.
24 class BASE_API ScopedVariant { 24 class BASE_EXPORT ScopedVariant {
25 public: 25 public:
26 // Declaration of a global variant variable that's always VT_EMPTY 26 // Declaration of a global variant variable that's always VT_EMPTY
27 static const VARIANT kEmptyVariant; 27 static const VARIANT kEmptyVariant;
28 28
29 // Default constructor. 29 // Default constructor.
30 ScopedVariant() { 30 ScopedVariant() {
31 // This is equivalent to what VariantInit does, but less code. 31 // This is equivalent to what VariantInit does, but less code.
32 var_.vt = VT_EMPTY; 32 var_.vt = VT_EMPTY;
33 } 33 }
34 34
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 // Use the Compare method instead. 158 // Use the Compare method instead.
159 bool operator==(const ScopedVariant& var) const; 159 bool operator==(const ScopedVariant& var) const;
160 bool operator!=(const ScopedVariant& var) const; 160 bool operator!=(const ScopedVariant& var) const;
161 DISALLOW_COPY_AND_ASSIGN(ScopedVariant); 161 DISALLOW_COPY_AND_ASSIGN(ScopedVariant);
162 }; 162 };
163 163
164 } // namespace win 164 } // namespace win
165 } // namesoace base 165 } // namesoace base
166 166
167 #endif // BASE_WIN_SCOPED_VARIANT_H_ 167 #endif // BASE_WIN_SCOPED_VARIANT_H_
OLDNEW
« no previous file with comments | « base/win/scoped_bstr.h ('k') | base/win/win_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698