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

Issue 11312222: Add LIBMTP_Get_File_Chunk() to read an arbitrary amount of data into memory. The existing APIs only… (Closed)

Created:
8 years, 1 month ago by Lei Zhang
Modified:
8 years, 1 month ago
CC:
chromium-reviews, Ben Chan, satorux1
Visibility:
Public.

Description

Add LIBMTP_Get_File_Chunk() to read an arbitrary amount of data into memory. The existing APIs only allow reading the entire file with a progress indicator callback. BUG=160860 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=167836

Patch Set 1 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+154 lines, -0 lines) Patch
A patches/15_read_chunks.diff View 1 chunk +99 lines, -0 lines 0 comments Download
M src/libmtp.h View 1 chunk +2 lines, -0 lines 0 comments Download
M src/libmtp.c View 1 chunk +50 lines, -0 lines 2 comments Download
M src/libmtp.sym View 1 chunk +1 line, -0 lines 0 comments Download
M src/libmtp.h.in View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Lei Zhang
LIBMTP_Get_File_Chunk() is just a simplified version of LIBMTP_Get_File_To_File_Descriptor(). Some of the code is duplicated and ...
8 years, 1 month ago (2012-11-14 00:26:51 UTC) #1
Jorge Lucangeli Obes
lgtm but please make sure the coding standard in the file is reasonably consistent. Since ...
8 years, 1 month ago (2012-11-15 01:46:10 UTC) #2
Lei Zhang
8 years, 1 month ago (2012-11-15 01:50:11 UTC) #3
https://codereview.chromium.org/11312222/diff/4001/src/libmtp.c
File src/libmtp.c (right):

https://codereview.chromium.org/11312222/diff/4001/src/libmtp.c#newcode5000
src/libmtp.c:5000: ret = ptp_object_want (params, id,
PTPOBJECT_OBJECTINFO_LOADED, &ob);
On 2012/11/15 01:46:10, Jorge Lucangeli Obes wrote:
> I'm not sure what the coding standard is for third_party, but we should be
able
> to keep it consistent inside one file. Did you write this code from scratch?

This is copied from line 5158. The code in this file is not 100% consistent with
itself. :)

Powered by Google App Engine
This is Rietveld 408576698