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

Side by Side Diff: chrome/utility/media_galleries/pmp_column_reader.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_MEDIA_GALLERIES_PMP_COLUMN_READER_H_ 5 #ifndef CHROME_UTILITY_MEDIA_GALLERIES_PMP_COLUMN_READER_H_
6 #define CHROME_UTILITY_MEDIA_GALLERIES_PMP_COLUMN_READER_H_ 6 #define CHROME_UTILITY_MEDIA_GALLERIES_PMP_COLUMN_READER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory>
10 #include <string> 11 #include <string>
11 #include <vector> 12 #include <vector>
12 13
13 #include "base/macros.h" 14 #include "base/macros.h"
14 #include "base/memory/scoped_ptr.h"
15 #include "chrome/common/media_galleries/pmp_constants.h" 15 #include "chrome/common/media_galleries/pmp_constants.h"
16 16
17 namespace base { 17 namespace base {
18 class File; 18 class File;
19 class FilePath; 19 class FilePath;
20 } 20 }
21 21
22 namespace picasa { 22 namespace picasa {
23 23
24 // Reads a single PMP column from a file. 24 // Reads a single PMP column from a file.
(...skipping 17 matching lines...) Expand all
42 42
43 // May only be called after successful ReadColumn. 43 // May only be called after successful ReadColumn.
44 uint32_t rows_read() const; 44 uint32_t rows_read() const;
45 45
46 private: 46 private:
47 bool ParseData(const PmpFieldType expected_type); 47 bool ParseData(const PmpFieldType expected_type);
48 // Returns the number of bytes parsed in the body, or, -1 on failure. 48 // Returns the number of bytes parsed in the body, or, -1 on failure.
49 int64_t IndexStrings(); 49 int64_t IndexStrings();
50 50
51 // Source data 51 // Source data
52 scoped_ptr<uint8_t[]> data_; 52 std::unique_ptr<uint8_t[]> data_;
53 int64_t length_; 53 int64_t length_;
54 54
55 // Header data 55 // Header data
56 PmpFieldType field_type_; 56 PmpFieldType field_type_;
57 uint32_t rows_read_; 57 uint32_t rows_read_;
58 58
59 // Index of string start locations if fields are strings. Empty otherwise. 59 // Index of string start locations if fields are strings. Empty otherwise.
60 std::vector<const char*> strings_; 60 std::vector<const char*> strings_;
61 61
62 DISALLOW_COPY_AND_ASSIGN(PmpColumnReader); 62 DISALLOW_COPY_AND_ASSIGN(PmpColumnReader);
63 }; 63 };
64 64
65 } // namespace picasa 65 } // namespace picasa
66 66
67 #endif // CHROME_UTILITY_MEDIA_GALLERIES_PMP_COLUMN_READER_H_ 67 #endif // CHROME_UTILITY_MEDIA_GALLERIES_PMP_COLUMN_READER_H_
OLDNEW
« no previous file with comments | « chrome/utility/media_galleries/media_metadata_parser.cc ('k') | chrome/utility/profile_import_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698