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

Unified Diff: chrome/browser/media_galleries/fileapi/picasa/pmp_column_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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/media_galleries/fileapi/picasa/pmp_column_reader.h
diff --git a/chrome/browser/media_galleries/fileapi/picasa/pmp_column_reader.h b/chrome/browser/media_galleries/fileapi/picasa/pmp_column_reader.h
index 19ec1d5b5832d4db6800911930f487792eebdec6..0b9197b987e086df2f3892efd8c1c0da0bdf6b15 100644
--- a/chrome/browser/media_galleries/fileapi/picasa/pmp_column_reader.h
+++ b/chrome/browser/media_galleries/fileapi/picasa/pmp_column_reader.h
@@ -10,6 +10,7 @@
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
+#include "base/platform_file.h"
#include "chrome/browser/media_galleries/fileapi/picasa/pmp_constants.h"
namespace base {
@@ -26,20 +27,22 @@ class PmpColumnReader {
// Returns true if read successfully.
// |rows_read| is undefined if returns false.
- bool Init(const base::FilePath& filepath, const PmpFieldType expected_type,
- uint32* rows_read);
+ bool Init(const base::PlatformFile& file, const PmpFieldType expected_type);
// These functions read the value of that |row| into |result|.
// Functions return false if the column is of the wrong type or the row
- // is out of range.
+ // is out of range. May only be called if successfully initialized.
bool ReadString(const uint32 row, std::string* result) const;
bool ReadUInt32(const uint32 row, uint32* result) const;
bool ReadDouble64(const uint32 row, double* result) const;
bool ReadUInt8(const uint32 row, uint8* result) const;
bool ReadUInt64(const uint32 row, uint64* result) const;
+ // May only be called if successfully initialized.
+ uint32 rows() const;
Greg Billock 2013/06/20 22:06:38 How about rows_read()
tommycli 2013/06/20 23:14:46 Done.
+
private:
- bool ParseData(const PmpFieldType expected_type, uint32* rows_read);
+ bool ParseData(const PmpFieldType expected_type);
// Returns the number of bytes parsed in the body, or, -1 on failure.
int64 IndexStrings();

Powered by Google App Engine
This is Rietveld 408576698