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