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

Side by Side Diff: printing/printing_context_win.cc

Issue 24989002: Cleanup: Use base namespace in printing/. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 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
« no previous file with comments | « printing/printing_context_win.h ('k') | 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 "printing/printing_context_win.h" 5 #include "printing/printing_context_win.h"
6 6
7 #include <winspool.h> 7 #include <winspool.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 const PageRanges& ranges) { 312 const PageRanges& ranges) {
313 DCHECK(!in_print_job_); 313 DCHECK(!in_print_job_);
314 314
315 bool collate; 315 bool collate;
316 int color; 316 int color;
317 bool landscape; 317 bool landscape;
318 bool print_to_pdf; 318 bool print_to_pdf;
319 bool is_cloud_dialog; 319 bool is_cloud_dialog;
320 int copies; 320 int copies;
321 int duplex_mode; 321 int duplex_mode;
322 string16 device_name; 322 base::string16 device_name;
323 323
324 if (!job_settings.GetBoolean(kSettingLandscape, &landscape) || 324 if (!job_settings.GetBoolean(kSettingLandscape, &landscape) ||
325 !job_settings.GetBoolean(kSettingCollate, &collate) || 325 !job_settings.GetBoolean(kSettingCollate, &collate) ||
326 !job_settings.GetInteger(kSettingColor, &color) || 326 !job_settings.GetInteger(kSettingColor, &color) ||
327 !job_settings.GetBoolean(kSettingPrintToPDF, &print_to_pdf) || 327 !job_settings.GetBoolean(kSettingPrintToPDF, &print_to_pdf) ||
328 !job_settings.GetInteger(kSettingDuplexMode, &duplex_mode) || 328 !job_settings.GetInteger(kSettingDuplexMode, &duplex_mode) ||
329 !job_settings.GetInteger(kSettingCopies, &copies) || 329 !job_settings.GetInteger(kSettingCopies, &copies) ||
330 !job_settings.GetString(kSettingDeviceName, &device_name) || 330 !job_settings.GetString(kSettingDeviceName, &device_name) ||
331 !job_settings.GetBoolean(kSettingCloudPrintDialog, &is_cloud_dialog)) { 331 !job_settings.GetBoolean(kSettingCloudPrintDialog, &is_cloud_dialog)) {
332 return OnError(); 332 return OnError();
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 449
450 if (!GetPrinterSettings(printer, settings_.device_name())) 450 if (!GetPrinterSettings(printer, settings_.device_name()))
451 status = FAILED; 451 status = FAILED;
452 452
453 if (status != OK) 453 if (status != OK)
454 ResetSettings(); 454 ResetSettings();
455 return status; 455 return status;
456 } 456 }
457 457
458 PrintingContext::Result PrintingContextWin::NewDocument( 458 PrintingContext::Result PrintingContextWin::NewDocument(
459 const string16& document_name) { 459 const base::string16& document_name) {
460 DCHECK(!in_print_job_); 460 DCHECK(!in_print_job_);
461 if (!context_) 461 if (!context_)
462 return OnError(); 462 return OnError();
463 463
464 // Set the flag used by the AbortPrintJob dialog procedure. 464 // Set the flag used by the AbortPrintJob dialog procedure.
465 abort_printing_ = false; 465 abort_printing_ = false;
466 466
467 in_print_job_ = true; 467 in_print_job_ = true;
468 468
469 // Register the application's AbortProc function with GDI. 469 // Register the application's AbortProc function with GDI.
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
769 769
770 if (dialog_options.hDevMode != NULL) 770 if (dialog_options.hDevMode != NULL)
771 GlobalFree(dialog_options.hDevMode); 771 GlobalFree(dialog_options.hDevMode);
772 if (dialog_options.hDevNames != NULL) 772 if (dialog_options.hDevNames != NULL)
773 GlobalFree(dialog_options.hDevNames); 773 GlobalFree(dialog_options.hDevNames);
774 774
775 return context_ ? OK : FAILED; 775 return context_ ? OK : FAILED;
776 } 776 }
777 777
778 } // namespace printing 778 } // namespace printing
OLDNEW
« no previous file with comments | « printing/printing_context_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698