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

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

Issue 10067034: RefCounted types should not have public destructors, printing/ and ui/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Created 8 years, 7 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/backend/print_backend_chromeos.cc ('k') | printing/backend/print_backend_win.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/print_backend.h" 5 #include "printing/backend/print_backend.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #include <dlfcn.h> 9 #include <dlfcn.h>
10 #include <errno.h> 10 #include <errno.h>
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 namespace printing { 96 namespace printing {
97 97
98 static const char kCUPSPrinterInfoOpt[] = "printer-info"; 98 static const char kCUPSPrinterInfoOpt[] = "printer-info";
99 static const char kCUPSPrinterStateOpt[] = "printer-state"; 99 static const char kCUPSPrinterStateOpt[] = "printer-state";
100 static const char kCUPSPrinterTypeOpt[] = "printer-type"; 100 static const char kCUPSPrinterTypeOpt[] = "printer-type";
101 static const char kCUPSPrinterMakeModelOpt[] = "printer-make-and-model"; 101 static const char kCUPSPrinterMakeModelOpt[] = "printer-make-and-model";
102 102
103 class PrintBackendCUPS : public PrintBackend { 103 class PrintBackendCUPS : public PrintBackend {
104 public: 104 public:
105 PrintBackendCUPS(const GURL& print_server_url, bool blocking); 105 PrintBackendCUPS(const GURL& print_server_url, bool blocking);
106 virtual ~PrintBackendCUPS() {}
107 106
108 // PrintBackend implementation. 107 // PrintBackend implementation.
109 virtual bool EnumeratePrinters(PrinterList* printer_list) OVERRIDE; 108 virtual bool EnumeratePrinters(PrinterList* printer_list) OVERRIDE;
110
111 virtual std::string GetDefaultPrinterName() OVERRIDE; 109 virtual std::string GetDefaultPrinterName() OVERRIDE;
112
113 virtual bool GetPrinterCapsAndDefaults( 110 virtual bool GetPrinterCapsAndDefaults(
114 const std::string& printer_name, 111 const std::string& printer_name,
115 PrinterCapsAndDefaults* printer_info) OVERRIDE; 112 PrinterCapsAndDefaults* printer_info) OVERRIDE;
116
117 virtual std::string GetPrinterDriverInfo( 113 virtual std::string GetPrinterDriverInfo(
118 const std::string& printer_name) OVERRIDE; 114 const std::string& printer_name) OVERRIDE;
115 virtual bool IsValidPrinter(const std::string& printer_name) OVERRIDE;
119 116
120 virtual bool IsValidPrinter(const std::string& printer_name) OVERRIDE; 117 protected:
118 virtual ~PrintBackendCUPS() {}
121 119
122 private: 120 private:
123 // Following functions are wrappers around corresponding CUPS functions. 121 // Following functions are wrappers around corresponding CUPS functions.
124 // <functions>2() are called when print server is specified, and plain 122 // <functions>2() are called when print server is specified, and plain
125 // version in another case. There is an issue specifing CUPS_HTTP_DEFAULT 123 // version in another case. There is an issue specifing CUPS_HTTP_DEFAULT
126 // in the <functions>2(), it does not work in CUPS prior to 1.4. 124 // in the <functions>2(), it does not work in CUPS prior to 1.4.
127 int GetDests(cups_dest_t** dests); 125 int GetDests(cups_dest_t** dests);
128 FilePath GetPPD(const char* name); 126 FilePath GetPPD(const char* name);
129 127
130 GURL print_server_url_; 128 GURL print_server_url_;
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 << ", HTTP error: " << http_error; 338 << ", HTTP error: " << http_error;
341 file_util::Delete(ppd_path, false); 339 file_util::Delete(ppd_path, false);
342 ppd_path.clear(); 340 ppd_path.clear();
343 } 341 }
344 } 342 }
345 } 343 }
346 return ppd_path; 344 return ppd_path;
347 } 345 }
348 346
349 } // namespace printing 347 } // namespace printing
OLDNEW
« no previous file with comments | « printing/backend/print_backend_chromeos.cc ('k') | printing/backend/print_backend_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698