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

Side by Side Diff: chrome/browser/printing/win_printing_context.cc

Issue 7995: Move Time, TimeDelta and TimeTicks into namespace base. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "chrome/browser/printing/win_printing_context.h" 5 #include "chrome/browser/printing/win_printing_context.h"
6 6
7 #include <winspool.h> 7 #include <winspool.h>
8 8
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/gfx/platform_device_win.h" 10 #include "base/gfx/platform_device_win.h"
11 #include "base/time_format.h" 11 #include "base/time_format.h"
12 #include "chrome/browser/browser_process.h" 12 #include "chrome/browser/browser_process.h"
13 #include "chrome/browser/printing/print_job_manager.h" 13 #include "chrome/browser/printing/print_job_manager.h"
14 14
15 using base::Time;
16
15 namespace { 17 namespace {
16 18
17 // Retrieves the content of a GetPrinter call. 19 // Retrieves the content of a GetPrinter call.
18 void GetPrinterHelper(HANDLE printer, int level, scoped_array<uint8>* buffer) { 20 void GetPrinterHelper(HANDLE printer, int level, scoped_array<uint8>* buffer) {
19 DWORD buf_size = 0; 21 DWORD buf_size = 0;
20 GetPrinter(printer, level, NULL, 0, &buf_size); 22 GetPrinter(printer, level, NULL, 0, &buf_size);
21 if (buf_size) { 23 if (buf_size) {
22 buffer->reset(new uint8[buf_size]); 24 buffer->reset(new uint8[buf_size]);
23 memset(buffer->get(), 0, buf_size); 25 memset(buffer->get(), 0, buf_size);
24 if (!GetPrinter(printer, level, buffer->get(), buf_size, &buf_size)) { 26 if (!GetPrinter(printer, level, buffer->get(), buf_size, &buf_size)) {
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 if (dialog_options.hDevMode != NULL) 597 if (dialog_options.hDevMode != NULL)
596 GlobalFree(dialog_options.hDevMode); 598 GlobalFree(dialog_options.hDevMode);
597 if (dialog_options.hDevNames != NULL) 599 if (dialog_options.hDevNames != NULL)
598 GlobalFree(dialog_options.hDevNames); 600 GlobalFree(dialog_options.hDevNames);
599 601
600 return hdc_ ? OK : FAILED; 602 return hdc_ ? OK : FAILED;
601 } 603 }
602 604
603 } // namespace printing 605 } // namespace printing
604 606
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698