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

Side by Side Diff: pdf/pdfium/pdfium_engine.cc

Issue 902443003: Include safe_conversions.h in pdfium_engine.cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "pdf/pdfium/pdfium_engine.h" 5 #include "pdf/pdfium/pdfium_engine.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include "base/json/json_writer.h" 9 #include "base/json/json_writer.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/numerics/safe_conversions.h"
12 #include "base/stl_util.h" 13 #include "base/stl_util.h"
13 #include "base/strings/string_number_conversions.h" 14 #include "base/strings/string_number_conversions.h"
14 #include "base/strings/string_piece.h" 15 #include "base/strings/string_piece.h"
15 #include "base/strings/string_util.h" 16 #include "base/strings/string_util.h"
16 #include "base/strings/utf_string_conversions.h" 17 #include "base/strings/utf_string_conversions.h"
17 #include "base/values.h" 18 #include "base/values.h"
18 #include "pdf/draw_utils.h" 19 #include "pdf/draw_utils.h"
19 #include "pdf/pdfium/pdfium_api_string_buffer_adapter.h" 20 #include "pdf/pdfium/pdfium_api_string_buffer_adapter.h"
20 #include "pdf/pdfium/pdfium_mem_buffer_file_read.h" 21 #include "pdf/pdfium/pdfium_mem_buffer_file_read.h"
21 #include "pdf/pdfium/pdfium_mem_buffer_file_write.h" 22 #include "pdf/pdfium/pdfium_mem_buffer_file_write.h"
(...skipping 4005 matching lines...) Expand 10 before | Expand all | Expand 10 after
4027 double* height) { 4028 double* height) {
4028 FPDF_DOCUMENT doc = FPDF_LoadMemDocument(pdf_buffer, pdf_buffer_size, NULL); 4029 FPDF_DOCUMENT doc = FPDF_LoadMemDocument(pdf_buffer, pdf_buffer_size, NULL);
4029 if (!doc) 4030 if (!doc)
4030 return false; 4031 return false;
4031 bool success = FPDF_GetPageSizeByIndex(doc, page_number, width, height) != 0; 4032 bool success = FPDF_GetPageSizeByIndex(doc, page_number, width, height) != 0;
4032 FPDF_CloseDocument(doc); 4033 FPDF_CloseDocument(doc);
4033 return success; 4034 return success;
4034 } 4035 }
4035 4036
4036 } // namespace chrome_pdf 4037 } // namespace chrome_pdf
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698