OLD | NEW |
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 "printing/backend/win_helper.h" | 5 #include "printing/backend/win_helper.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include <algorithm> | 9 #include <algorithm> |
8 | 10 |
9 #include "base/file_version_info.h" | 11 #include "base/file_version_info.h" |
10 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
11 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "base/macros.h" |
12 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
13 #include "base/numerics/safe_conversions.h" | 16 #include "base/numerics/safe_conversions.h" |
14 #include "base/strings/string_util.h" | 17 #include "base/strings/string_util.h" |
15 #include "base/strings/stringprintf.h" | 18 #include "base/strings/stringprintf.h" |
16 #include "base/strings/utf_string_conversions.h" | 19 #include "base/strings/utf_string_conversions.h" |
17 #include "base/win/scoped_comptr.h" | 20 #include "base/win/scoped_comptr.h" |
18 #include "printing/backend/print_backend.h" | 21 #include "printing/backend/print_backend.h" |
19 #include "printing/backend/print_backend_consts.h" | 22 #include "printing/backend/print_backend_consts.h" |
20 #include "printing/backend/printing_info_win.h" | 23 #include "printing/backend/printing_info_win.h" |
21 | 24 |
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 *canceled = (result == IDCANCEL); | 527 *canceled = (result == IDCANCEL); |
525 if (result != IDOK) | 528 if (result != IDOK) |
526 return scoped_ptr<DEVMODE, base::FreeDeleter>(); | 529 return scoped_ptr<DEVMODE, base::FreeDeleter>(); |
527 int size = out->dmSize; | 530 int size = out->dmSize; |
528 int extra_size = out->dmDriverExtra; | 531 int extra_size = out->dmDriverExtra; |
529 CHECK_GE(buffer_size, size + extra_size); | 532 CHECK_GE(buffer_size, size + extra_size); |
530 return out.Pass(); | 533 return out.Pass(); |
531 } | 534 } |
532 | 535 |
533 } // namespace printing | 536 } // namespace printing |
OLD | NEW |