| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "printing/metafile.h" | 5 #include "printing/metafile.h" |
| 6 | 6 |
| 7 #include <stdint.h> |
| 8 |
| 7 #include <vector> | 9 #include <vector> |
| 8 | 10 |
| 9 #include "base/files/file.h" | 11 #include "base/files/file.h" |
| 10 #include "base/numerics/safe_conversions.h" | 12 #include "base/numerics/safe_conversions.h" |
| 11 | 13 |
| 12 namespace printing { | 14 namespace printing { |
| 13 | 15 |
| 14 MetafilePlayer::MetafilePlayer() { | 16 MetafilePlayer::MetafilePlayer() { |
| 15 } | 17 } |
| 16 | 18 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 41 | 43 |
| 42 int size = base::checked_cast<int>(buffer.size()); | 44 int size = base::checked_cast<int>(buffer.size()); |
| 43 if (file->WriteAtCurrentPos(&buffer[0], size) != size) { | 45 if (file->WriteAtCurrentPos(&buffer[0], size) != size) { |
| 44 DLOG(ERROR) << "Failed to save file."; | 46 DLOG(ERROR) << "Failed to save file."; |
| 45 return false; | 47 return false; |
| 46 } | 48 } |
| 47 return true; | 49 return true; |
| 48 } | 50 } |
| 49 | 51 |
| 50 } // namespace printing | 52 } // namespace printing |
| OLD | NEW |