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

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

Issue 2625903003: Update scoped_ptr references to be unique_ptr in src/base comments. (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « base/task_scheduler/sequence_unittest.cc ('k') | base/win/scoped_comptr.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_BSTR_H_ 5 #ifndef BASE_WIN_SCOPED_BSTR_H_
6 #define BASE_WIN_SCOPED_BSTR_H_ 6 #define BASE_WIN_SCOPED_BSTR_H_
7 7
8 #include <windows.h> 8 #include <windows.h>
9 #include <oleauto.h> 9 #include <oleauto.h>
10 #include <stddef.h> 10 #include <stddef.h>
11 11
12 #include "base/base_export.h" 12 #include "base/base_export.h"
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "base/strings/string16.h" 15 #include "base/strings/string16.h"
16 16
17 namespace base { 17 namespace base {
18 namespace win { 18 namespace win {
19 19
20 // Manages a BSTR string pointer. 20 // Manages a BSTR string pointer.
21 // The class interface is based on scoped_ptr. 21 // The class interface is based on uniquie_ptr.
dcheng 2017/01/11 04:42:34 Nit: unique_ptr
22 class BASE_EXPORT ScopedBstr { 22 class BASE_EXPORT ScopedBstr {
23 public: 23 public:
24 ScopedBstr() : bstr_(NULL) { 24 ScopedBstr() : bstr_(NULL) {
25 } 25 }
26 26
27 // Constructor to create a new BSTR. 27 // Constructor to create a new BSTR.
28 // 28 //
29 // NOTE: Do not pass a BSTR to this constructor expecting ownership to 29 // NOTE: Do not pass a BSTR to this constructor expecting ownership to
30 // be transferred - even though it compiles! ;-) 30 // be transferred - even though it compiles! ;-)
31 explicit ScopedBstr(const char16* non_bstr); 31 explicit ScopedBstr(const char16* non_bstr);
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 // BSTR owned by two different scoped_ptrs. 90 // BSTR owned by two different scoped_ptrs.
91 bool operator==(const ScopedBstr& bstr2) const; 91 bool operator==(const ScopedBstr& bstr2) const;
92 bool operator!=(const ScopedBstr& bstr2) const; 92 bool operator!=(const ScopedBstr& bstr2) const;
93 DISALLOW_COPY_AND_ASSIGN(ScopedBstr); 93 DISALLOW_COPY_AND_ASSIGN(ScopedBstr);
94 }; 94 };
95 95
96 } // namespace win 96 } // namespace win
97 } // namespace base 97 } // namespace base
98 98
99 #endif // BASE_WIN_SCOPED_BSTR_H_ 99 #endif // BASE_WIN_SCOPED_BSTR_H_
OLDNEW
« no previous file with comments | « base/task_scheduler/sequence_unittest.cc ('k') | base/win/scoped_comptr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698