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

Side by Side Diff: chrome/utility/safe_browsing/mac/dmg_iterator.h

Issue 1899083002: Convert //chrome from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 CHROME_UTILITY_SAFE_BROWSING_MAC_DMG_ITERATOR_H_ 5 #ifndef CHROME_UTILITY_SAFE_BROWSING_MAC_DMG_ITERATOR_H_
6 #define CHROME_UTILITY_SAFE_BROWSING_MAC_DMG_ITERATOR_H_ 6 #define CHROME_UTILITY_SAFE_BROWSING_MAC_DMG_ITERATOR_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory>
11
10 #include "base/macros.h" 12 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/scoped_vector.h" 13 #include "base/memory/scoped_vector.h"
13 #include "base/strings/string16.h" 14 #include "base/strings/string16.h"
14 #include "chrome/utility/safe_browsing/mac/udif.h" 15 #include "chrome/utility/safe_browsing/mac/udif.h"
15 16
16 namespace safe_browsing { 17 namespace safe_browsing {
17 namespace dmg { 18 namespace dmg {
18 19
19 class HFSIterator; 20 class HFSIterator;
20 class ReadStream; 21 class ReadStream;
21 22
(...skipping 15 matching lines...) Expand all
37 bool Open(); 38 bool Open();
38 39
39 // Advances the iterator to the next file item. Returns true on success 40 // Advances the iterator to the next file item. Returns true on success
40 // and false on end-of-iterator. 41 // and false on end-of-iterator.
41 bool Next(); 42 bool Next();
42 43
43 // Returns the full path in a DMG filesystem to the current file item. 44 // Returns the full path in a DMG filesystem to the current file item.
44 base::string16 GetPath(); 45 base::string16 GetPath();
45 46
46 // Returns a ReadStream for the current file item. 47 // Returns a ReadStream for the current file item.
47 scoped_ptr<ReadStream> GetReadStream(); 48 std::unique_ptr<ReadStream> GetReadStream();
48 49
49 private: 50 private:
50 UDIFParser udif_; // The UDIF parser that accesses the partitions. 51 UDIFParser udif_; // The UDIF parser that accesses the partitions.
51 ScopedVector<ReadStream> partitions_; // Streams for all the HFS partitions. 52 ScopedVector<ReadStream> partitions_; // Streams for all the HFS partitions.
52 size_t current_partition_; // The index in |partitions_| of the current one. 53 size_t current_partition_; // The index in |partitions_| of the current one.
53 scoped_ptr<HFSIterator> hfs_; // The HFSIterator for |current_partition_|. 54 std::unique_ptr<HFSIterator>
55 hfs_; // The HFSIterator for |current_partition_|.
54 56
55 DISALLOW_COPY_AND_ASSIGN(DMGIterator); 57 DISALLOW_COPY_AND_ASSIGN(DMGIterator);
56 }; 58 };
57 59
58 } // namespace dmg 60 } // namespace dmg
59 } // namespace safe_browsing 61 } // namespace safe_browsing
60 62
61 #endif // CHROME_UTILITY_SAFE_BROWSING_MAC_DMG_ITERATOR_H_ 63 #endif // CHROME_UTILITY_SAFE_BROWSING_MAC_DMG_ITERATOR_H_
OLDNEW
« no previous file with comments | « chrome/utility/safe_browsing/mac/dmg_analyzer.cc ('k') | chrome/utility/safe_browsing/mac/dmg_iterator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698