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

Side by Side Diff: base/scoped_variant_win.h

Issue 47007: Fixing problem with ScopedVariant in official builds. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | base/scoped_variant_win.cc » ('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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_SCOPED_VARIANT_WIN_H_ 5 #ifndef BASE_SCOPED_VARIANT_WIN_H_
6 #define BASE_SCOPED_VARIANT_WIN_H_ 6 #define BASE_SCOPED_VARIANT_WIN_H_
7 7
8 #include <windows.h> 8 #include <windows.h>
9 #include <oleauto.h> 9 #include <oleauto.h>
10 10
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 // it as such and cast away the constness here. 111 // it as such and cast away the constness here.
112 return const_cast<VARIANT*>(&var_); 112 return const_cast<VARIANT*>(&var_);
113 } 113 }
114 114
115 // Allows the ScopedVariant instance to be passed to functions either by value 115 // Allows the ScopedVariant instance to be passed to functions either by value
116 // or by const reference. 116 // or by const reference.
117 operator const VARIANT&() const { 117 operator const VARIANT&() const {
118 return var_; 118 return var_;
119 } 119 }
120 120
121 #ifndef OFFICIAL_BUILD 121 // Used as a debug check to see if we're leaking anything.
122 static bool IsLeakableVarType(VARTYPE vt); 122 static bool IsLeakableVarType(VARTYPE vt);
123 #endif
124 123
125 protected: 124 protected:
126 VARIANT var_; 125 VARIANT var_;
127 126
128 private: 127 private:
129 // Comparison operators for ScopedVariant are not supported at this point. 128 // Comparison operators for ScopedVariant are not supported at this point.
130 // Use the Compare method instead. 129 // Use the Compare method instead.
131 bool operator==(const ScopedVariant& var) const; 130 bool operator==(const ScopedVariant& var) const;
132 bool operator!=(const ScopedVariant& var) const; 131 bool operator!=(const ScopedVariant& var) const;
133 DISALLOW_COPY_AND_ASSIGN(ScopedVariant); 132 DISALLOW_COPY_AND_ASSIGN(ScopedVariant);
134 }; 133 };
135 134
136 #endif // BASE_SCOPED_VARIANT_WIN_H_ 135 #endif // BASE_SCOPED_VARIANT_WIN_H_
OLDNEW
« no previous file with comments | « no previous file | base/scoped_variant_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698