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

Side by Side Diff: printing/backend/cups_helper.cc

Issue 345453005: Fixed C++ type conversion. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Wed 06/18/2014 10:25:34.94 Created 6 years, 6 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 | « no previous file | printing/backend/cups_helper_unittest.cc » ('j') | 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/backend/cups_helper.h" 5 #include "printing/backend/cups_helper.h"
6 6
7 #include <cups/ppd.h> 7 #include <cups/ppd.h>
8 8
9 #include "base/base_paths.h" 9 #include "base/base_paths.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 18 matching lines...) Expand all
29 const char kColorMode[] = "ColorMode"; 29 const char kColorMode[] = "ColorMode";
30 const char kProcessColorModel[] = "ProcessColorModel"; 30 const char kProcessColorModel[] = "ProcessColorModel";
31 const char kPrintoutMode[] = "PrintoutMode"; 31 const char kPrintoutMode[] = "PrintoutMode";
32 const char kDraftGray[] = "Draft.Gray"; 32 const char kDraftGray[] = "Draft.Gray";
33 const char kHighGray[] = "High.Gray"; 33 const char kHighGray[] = "High.Gray";
34 34
35 const char kDuplex[] = "Duplex"; 35 const char kDuplex[] = "Duplex";
36 const char kDuplexNone[] = "None"; 36 const char kDuplexNone[] = "None";
37 const char kPageSize[] = "PageSize"; 37 const char kPageSize[] = "PageSize";
38 38
39 const double kMicronsPerPoint = kHundrethsMMPerInch / kPointsPerInch * 10; 39 const double kMicronsPerPoint = 10.0f * kHundrethsMMPerInch / kPointsPerInch;
40 40
41 #if !defined(OS_MACOSX) 41 #if !defined(OS_MACOSX)
42 void ParseLpOptions(const base::FilePath& filepath, 42 void ParseLpOptions(const base::FilePath& filepath,
43 const std::string& printer_name, 43 const std::string& printer_name,
44 int* num_options, cups_option_t** options) { 44 int* num_options, cups_option_t** options) {
45 std::string content; 45 std::string content;
46 if (!base::ReadFileToString(filepath, &content)) 46 if (!base::ReadFileToString(filepath, &content))
47 return; 47 return;
48 48
49 const char kDest[] = "dest"; 49 const char kDest[] = "dest";
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 } 435 }
436 436
437 ppdClose(ppd); 437 ppdClose(ppd);
438 base::DeleteFile(ppd_file_path, false); 438 base::DeleteFile(ppd_file_path, false);
439 439
440 *printer_info = caps; 440 *printer_info = caps;
441 return true; 441 return true;
442 } 442 }
443 443
444 } // namespace printing 444 } // namespace printing
OLDNEW
« no previous file with comments | « no previous file | printing/backend/cups_helper_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698