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

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

Issue 2802973003: Remove ScopedVector from chrome/ (Closed)
Patch Set: Created 3 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> 10 #include <memory>
11 #include <vector>
11 12
12 #include "base/macros.h" 13 #include "base/macros.h"
13 #include "base/memory/scoped_vector.h"
14 #include "base/strings/string16.h" 14 #include "base/strings/string16.h"
15 #include "chrome/utility/safe_browsing/mac/udif.h" 15 #include "chrome/utility/safe_browsing/mac/udif.h"
16 16
17 namespace safe_browsing { 17 namespace safe_browsing {
18 namespace dmg { 18 namespace dmg {
19 19
20 class HFSIterator; 20 class HFSIterator;
21 class ReadStream; 21 class ReadStream;
22 22
23 // DMGIterator provides iterator access over all of the concrete files located 23 // DMGIterator provides iterator access over all of the concrete files located
(...skipping 18 matching lines...) Expand all
42 bool Next(); 42 bool Next();
43 43
44 // 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.
45 base::string16 GetPath(); 45 base::string16 GetPath();
46 46
47 // Returns a ReadStream for the current file item. 47 // Returns a ReadStream for the current file item.
48 std::unique_ptr<ReadStream> GetReadStream(); 48 std::unique_ptr<ReadStream> GetReadStream();
49 49
50 private: 50 private:
51 UDIFParser udif_; // The UDIF parser that accesses the partitions. 51 UDIFParser udif_; // The UDIF parser that accesses the partitions.
52 ScopedVector<ReadStream> partitions_; // Streams for all the HFS partitions. 52 std::vector<std::unique_ptr<ReadStream>>
53 partitions_; // Streams for all the HFS partitions.
sky 2017/04/07 14:42:14 Move the comment the previous line to avoid the ob
leonhsl(Using Gerrit) 2017/04/10 08:33:06 Done and thanks.
53 size_t current_partition_; // The index in |partitions_| of the current one. 54 size_t current_partition_; // The index in |partitions_| of the current one.
54 std::unique_ptr<HFSIterator> 55 std::unique_ptr<HFSIterator>
55 hfs_; // The HFSIterator for |current_partition_|. 56 hfs_; // The HFSIterator for |current_partition_|.
56 57
57 DISALLOW_COPY_AND_ASSIGN(DMGIterator); 58 DISALLOW_COPY_AND_ASSIGN(DMGIterator);
58 }; 59 };
59 60
60 } // namespace dmg 61 } // namespace dmg
61 } // namespace safe_browsing 62 } // namespace safe_browsing
62 63
63 #endif // CHROME_UTILITY_SAFE_BROWSING_MAC_DMG_ITERATOR_H_ 64 #endif // CHROME_UTILITY_SAFE_BROWSING_MAC_DMG_ITERATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698