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

Side by Side Diff: chrome/browser/media_galleries/fileapi/picasa/pmp_table_reader.h

Issue 17101030: Media Galleries API - Picasa: Change PMP Parsing to deal with PlatformFile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 6 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_PICASA_PMP_TABLE_READER_H_
6 #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_PICASA_PMP_TABLE_READER_H_
7
8 #include <map>
9 #include <string>
10
11 #include "base/basictypes.h"
12 #include "base/files/file_path.h"
13 #include "base/memory/scoped_vector.h"
14 #include "chrome/browser/media_galleries/fileapi/picasa/pmp_constants.h"
15
16 namespace base {
17 class FilePath;
18 }
19
20 namespace picasa {
21
22 class PmpColumnReader;
23
24 class PmpTableReader {
25 public:
26 PmpTableReader(const std::string& table_name,
27 const base::FilePath& directory_path);
28
29 virtual ~PmpTableReader();
30
31 // Returns NULL on failure.
32 const PmpColumnReader* AddColumn(const std::string& column_name,
33 const PmpFieldType expected_type);
34
35 // Returns a const "view" of the successfully added columns.
36 std::map<std::string, const PmpColumnReader*> Columns() const;
37
38 // This value may change after calls to AddColumn().
39 uint32 RowCount() const;
40
41 private:
42 bool initialized_;
43
44 std::string table_name_;
45 base::FilePath directory_path_;
46
47 ScopedVector<PmpColumnReader> column_readers_;
48 std::map<std::string, const PmpColumnReader*> column_map_;
49
50 uint32 max_row_count_;
51
52 DISALLOW_COPY_AND_ASSIGN(PmpTableReader);
53 };
54
55 } // namespace picasa
56
57 #endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_PICASA_PMP_TABLE_READER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698