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

Side by Side Diff: base/mac/scoped_launch_data.h

Issue 1852433005: Convert //base to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase after r384946 Created 4 years, 8 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/mac/scoped_cftyperef.h ('k') | base/mac/scoped_nsobject.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_MAC_SCOPED_LAUNCH_DATA_H_ 5 #ifndef BASE_MAC_SCOPED_LAUNCH_DATA_H_
6 #define BASE_MAC_SCOPED_LAUNCH_DATA_H_ 6 #define BASE_MAC_SCOPED_LAUNCH_DATA_H_
7 7
8 #include <launch.h> 8 #include <launch.h>
9 9
10 #include "base/scoped_generic.h" 10 #include "base/scoped_generic.h"
11 11
12 namespace base { 12 namespace base {
13 namespace mac { 13 namespace mac {
14 14
15 namespace internal { 15 namespace internal {
16 16
17 struct ScopedLaunchDataTraits { 17 struct ScopedLaunchDataTraits {
18 static launch_data_t InvalidValue() { return nullptr; } 18 static launch_data_t InvalidValue() { return nullptr; }
19 static void Free(launch_data_t ldt) { launch_data_free(ldt); } 19 static void Free(launch_data_t ldt) { launch_data_free(ldt); }
20 }; 20 };
21 21
22 } // namespace internal 22 } // namespace internal
23 23
24 // Just like scoped_ptr<> but for launch_data_t. 24 // Just like std::unique_ptr<> but for launch_data_t.
25 using ScopedLaunchData = 25 using ScopedLaunchData =
26 ScopedGeneric<launch_data_t, internal::ScopedLaunchDataTraits>; 26 ScopedGeneric<launch_data_t, internal::ScopedLaunchDataTraits>;
27 27
28 } // namespace mac 28 } // namespace mac
29 } // namespace base 29 } // namespace base
30 30
31 #endif // BASE_MAC_SCOPED_LAUNCH_DATA_H_ 31 #endif // BASE_MAC_SCOPED_LAUNCH_DATA_H_
OLDNEW
« no previous file with comments | « base/mac/scoped_cftyperef.h ('k') | base/mac/scoped_nsobject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698