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

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

Issue 8570015: Fix a typo in CUPS duplex printer detection code. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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 | « no previous file | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/print_system_task_proxy.h" 5 #include "chrome/browser/printing/print_system_task_proxy.h"
6 6
7 #include <ctype.h> 7 #include <ctype.h>
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 file_util::Delete(ppd_file_path, false); 416 file_util::Delete(ppd_file_path, false);
417 return; 417 return;
418 } 418 }
419 419
420 ppd_file_t* ppd = ppdOpenFile(ppd_file_path.value().c_str()); 420 ppd_file_t* ppd = ppdOpenFile(ppd_file_path.value().c_str());
421 if (ppd) { 421 if (ppd) {
422 #if !defined(OS_MACOSX) 422 #if !defined(OS_MACOSX)
423 printing_internal::mark_lpoptions(printer_name, &ppd); 423 printing_internal::mark_lpoptions(printer_name, &ppd);
424 #endif 424 #endif
425 ppd_choice_t* duplex_choice = ppdFindMarkedChoice(ppd, kDuplex); 425 ppd_choice_t* duplex_choice = ppdFindMarkedChoice(ppd, kDuplex);
426 if (duplex_choice) { 426 if (!duplex_choice) {
427 ppd_option_t* option = ppdFindOption(ppd, kDuplex); 427 ppd_option_t* option = ppdFindOption(ppd, kDuplex);
428 if (option) 428 if (option)
429 duplex_choice = ppdFindChoice(option, option->defchoice); 429 duplex_choice = ppdFindChoice(option, option->defchoice);
430 } 430 }
431 431
432 if (duplex_choice) { 432 if (duplex_choice) {
433 if (base::strcasecmp(duplex_choice->choice, kDuplexNone) != 0) { 433 if (base::strcasecmp(duplex_choice->choice, kDuplexNone) != 0) {
434 set_duplex_as_default = true; 434 set_duplex_as_default = true;
435 default_duplex_setting_value = printing::LONG_EDGE; 435 default_duplex_setting_value = printing::LONG_EDGE;
436 } else { 436 } else {
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 base::Bind(&PrintSystemTaskProxy::SendPrinterCapabilities, this, 535 base::Bind(&PrintSystemTaskProxy::SendPrinterCapabilities, this,
536 settings_info.DeepCopy())); 536 settings_info.DeepCopy()));
537 } 537 }
538 538
539 void PrintSystemTaskProxy::SendPrinterCapabilities( 539 void PrintSystemTaskProxy::SendPrinterCapabilities(
540 DictionaryValue* settings_info) { 540 DictionaryValue* settings_info) {
541 if (handler_) 541 if (handler_)
542 handler_->SendPrinterCapabilities(*settings_info); 542 handler_->SendPrinterCapabilities(*settings_info);
543 delete settings_info; 543 delete settings_info;
544 } 544 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698