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

Side by Side Diff: pdf/pdfium/pdfium_api_string_buffer_adapter.h

Issue 1533413002: Switch to standard integer types in pdf/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 years 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
« no previous file with comments | « pdf/pdf_engine.h ('k') | pdf/pdfium/pdfium_api_string_buffer_adapter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 PDF_PDFIUM_PDFIUM_API_STRING_BUFFER_ADAPTER_H_ 5 #ifndef PDF_PDFIUM_PDFIUM_API_STRING_BUFFER_ADAPTER_H_
6 #define PDF_PDFIUM_PDFIUM_API_STRING_BUFFER_ADAPTER_H_ 6 #define PDF_PDFIUM_PDFIUM_API_STRING_BUFFER_ADAPTER_H_
7 7
8 #include "base/basictypes.h" 8 #include <stddef.h>
9
10 #include "base/macros.h"
9 #include "base/numerics/safe_math.h" 11 #include "base/numerics/safe_math.h"
10 12
11 namespace chrome_pdf { 13 namespace chrome_pdf {
12 14
13 // Helper to deal with the fact that many PDFium APIs write the null-terminator 15 // Helper to deal with the fact that many PDFium APIs write the null-terminator
14 // into string buffers that are passed to them, but the PDF plugin likes to pass 16 // into string buffers that are passed to them, but the PDF plugin likes to pass
15 // in std::strings / base::string16s, where one should not count on the internal 17 // in std::strings / base::string16s, where one should not count on the internal
16 // string buffers to be null-terminated. 18 // string buffers to be null-terminated.
17 19
18 template <class StringType> 20 template <class StringType>
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 Close(unsigned_size.ValueOrDie()); 92 Close(unsigned_size.ValueOrDie());
91 } 93 }
92 94
93 private: 95 private:
94 PDFiumAPIStringBufferAdapter<StringType> adapter_; 96 PDFiumAPIStringBufferAdapter<StringType> adapter_;
95 }; 97 };
96 98
97 } // namespace chrome_pdf 99 } // namespace chrome_pdf
98 100
99 #endif // PDF_PDFIUM_PDFIUM_API_STRING_BUFFER_ADAPTER_H_ 101 #endif // PDF_PDFIUM_PDFIUM_API_STRING_BUFFER_ADAPTER_H_
OLDNEW
« no previous file with comments | « pdf/pdf_engine.h ('k') | pdf/pdfium/pdfium_api_string_buffer_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698