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

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

Issue 3781009: Move the windows-specific scoped_* stuff from base to base/win and in the bas... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 2 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #include "base/scoped_variant_win.h" 5 #include "base/scoped_variant_win.h"
6 #include "base/logging.h" 6 #include "base/logging.h"
7 7
8 namespace base {
9 namespace win {
10
8 // Global, const instance of an empty variant. 11 // Global, const instance of an empty variant.
9 const VARIANT ScopedVariant::kEmptyVariant = { VT_EMPTY }; 12 const VARIANT ScopedVariant::kEmptyVariant = { VT_EMPTY };
10 13
11 ScopedVariant::~ScopedVariant() { 14 ScopedVariant::~ScopedVariant() {
12 COMPILE_ASSERT(sizeof(ScopedVariant) == sizeof(VARIANT), ScopedVariantSize); 15 COMPILE_ASSERT(sizeof(ScopedVariant) == sizeof(VARIANT), ScopedVariantSize);
13 ::VariantClear(&var_); 16 ::VariantClear(&var_);
14 } 17 }
15 18
16 ScopedVariant::ScopedVariant(const wchar_t* str) { 19 ScopedVariant::ScopedVariant(const wchar_t* str) {
17 var_.vt = VT_EMPTY; 20 var_.vt = VT_EMPTY;
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 leakable = true; 264 leakable = true;
262 break; 265 break;
263 } 266 }
264 267
265 if (!leakable && (vt & VT_ARRAY) != 0) { 268 if (!leakable && (vt & VT_ARRAY) != 0) {
266 leakable = true; 269 leakable = true;
267 } 270 }
268 271
269 return leakable; 272 return leakable;
270 } 273 }
274
275 } // namespace win
276 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698