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

Unified Diff: content/public/common/child_process_sandbox_support_linux.h

Issue 12433021: Modify content::GetFontTable so clients can control what is read. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address first round of comments. Created 7 years, 9 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: content/public/common/child_process_sandbox_support_linux.h
diff --git a/content/public/common/child_process_sandbox_support_linux.h b/content/public/common/child_process_sandbox_support_linux.h
index 20945582c064a0c05322f1f4e695b65fae237a10..5cfe43e8b34e1ffca35974b5411e7d184ba3efaf 100644
--- a/content/public/common/child_process_sandbox_support_linux.h
+++ b/content/public/common/child_process_sandbox_support_linux.h
@@ -31,14 +31,16 @@ CONTENT_EXPORT int MatchFontWithFallback(const std::string& face, bool bold,
// GetFontTable loads a specified font table from an open SFNT file.
// fd: a file descriptor to the SFNT file. The position doesn't matter.
-// table: the table in *big-endian* format, or 0 for the whole font file.
+// table: the table in *big-endian* format, or 0 for the entire font.
+// offset: offset into the table or entire font where loading should start.
+// The offset must be non-negative.
// output: a buffer of size output_length that gets the data. can be 0, in
// which case output_length will be set to the required size in bytes.
// output_length: size of output, if it's not 0.
//
// returns: true on success.
-CONTENT_EXPORT bool GetFontTable(int fd, uint32_t table, uint8_t* output,
- size_t* output_length);
+CONTENT_EXPORT bool GetFontTable(int fd, uint32_t table, off_t offset,
+ uint8_t* output, size_t* output_length);
}; // namespace content

Powered by Google App Engine
This is Rietveld 408576698