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

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

Issue 6747014: Base: Last set of files to use BASE_API (for base.dll) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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
OLDNEW
1 // Copyright (c) 2010 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_BSTR_H_ 5 #ifndef BASE_WIN_SCOPED_BSTR_H_
6 #define BASE_WIN_SCOPED_BSTR_H_ 6 #define BASE_WIN_SCOPED_BSTR_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/logging.h" 13 #include "base/logging.h"
13 #include "base/string16.h" 14 #include "base/string16.h"
14 15
15 namespace base { 16 namespace base {
16 namespace win { 17 namespace win {
17 18
18 // Manages a BSTR string pointer. 19 // Manages a BSTR string pointer.
19 // The class interface is based on scoped_ptr. 20 // The class interface is based on scoped_ptr.
20 class ScopedBstr { 21 class BASE_API ScopedBstr {
21 public: 22 public:
22 ScopedBstr() : bstr_(NULL) { 23 ScopedBstr() : bstr_(NULL) {
23 } 24 }
24 25
25 // Constructor to create a new BSTR. 26 // Constructor to create a new BSTR.
26 // 27 //
27 // NOTE: Do not pass a BSTR to this constructor expecting ownership to 28 // NOTE: Do not pass a BSTR to this constructor expecting ownership to
28 // be transferred - even though it compiles! ;-) 29 // be transferred - even though it compiles! ;-)
29 explicit ScopedBstr(const char16* non_bstr); 30 explicit ScopedBstr(const char16* non_bstr);
30 ~ScopedBstr(); 31 ~ScopedBstr();
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 // BSTR owned by two different scoped_ptrs. 89 // BSTR owned by two different scoped_ptrs.
89 bool operator==(const ScopedBstr& bstr2) const; 90 bool operator==(const ScopedBstr& bstr2) const;
90 bool operator!=(const ScopedBstr& bstr2) const; 91 bool operator!=(const ScopedBstr& bstr2) const;
91 DISALLOW_COPY_AND_ASSIGN(ScopedBstr); 92 DISALLOW_COPY_AND_ASSIGN(ScopedBstr);
92 }; 93 };
93 94
94 } // namespace win 95 } // namespace win
95 } // namespace base 96 } // namespace base
96 97
97 #endif // BASE_SCOPED_BSTR_H_ 98 #endif // BASE_SCOPED_BSTR_H_
OLDNEW
« base/base_api.h ('K') | « base/win/registry.h ('k') | base/win/scoped_variant.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698