Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 "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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 75 LOG(ERROR) << "Gnutls initialization failed"; | 75 LOG(ERROR) << "Gnutls initialization failed"; |
| 76 } | 76 } |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 static base::LazyInstance<GcryptInitializer> g_gcrypt_initializer( | 79 static base::LazyInstance<GcryptInitializer> g_gcrypt_initializer( |
| 80 base::LINKER_INITIALIZED); | 80 base::LINKER_INITIALIZED); |
| 81 | 81 |
| 82 } // namespace | 82 } // namespace |
| 83 #endif // defined(OS_MACOSX) | 83 #endif // defined(OS_MACOSX) |
| 84 | 84 |
| 85 // Define CUPS_PRINTER_SCANNER for Linux CUPS < 1.4 | |
| 86 #if defined(OS_LINUX) | |
| 87 #if CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR < 4 | |
| 88 const int CUPS_PRINTER_SCANNER = 0x2000000; // Scanner-only device | |
|
kmadhusu
2011/09/21 17:15:30
lines 29-32 declares this variables for OS_MAC. Yo
chrelad
2011/09/21 17:53:10
Hmmm, not working well for me due to the 80 charac
kmadhusu
2011/09/21 18:01:50
Try using line continuation '\' character before t
Lei Zhang
2011/09/21 18:22:34
This is print_backend_cups.cc, you don't need to c
chrelad
2011/09/21 18:25:33
Done
chrelad
2011/09/21 18:30:57
Huh, okay; well, could you look at the latest vers
| |
| 89 #endif // CUPS_VERSION_MINOR < 4 | |
| 90 #endif // defined(OS_LINUX) | |
| 91 | |
| 85 namespace printing { | 92 namespace printing { |
| 86 | 93 |
| 87 static const char kCUPSPrinterInfoOpt[] = "printer-info"; | 94 static const char kCUPSPrinterInfoOpt[] = "printer-info"; |
| 88 static const char kCUPSPrinterStateOpt[] = "printer-state"; | 95 static const char kCUPSPrinterStateOpt[] = "printer-state"; |
| 89 static const char kCUPSPrinterTypeOpt[] = "printer-type"; | 96 static const char kCUPSPrinterTypeOpt[] = "printer-type"; |
| 90 | 97 |
| 91 class PrintBackendCUPS : public PrintBackend { | 98 class PrintBackendCUPS : public PrintBackend { |
| 92 public: | 99 public: |
| 93 PrintBackendCUPS(const GURL& print_server_url, bool blocking); | 100 PrintBackendCUPS(const GURL& print_server_url, bool blocking); |
| 94 virtual ~PrintBackendCUPS() {} | 101 virtual ~PrintBackendCUPS() {} |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 298 << ", HTTP error: " << http_error; | 305 << ", HTTP error: " << http_error; |
| 299 file_util::Delete(ppd_path, false); | 306 file_util::Delete(ppd_path, false); |
| 300 ppd_path.clear(); | 307 ppd_path.clear(); |
| 301 } | 308 } |
| 302 } | 309 } |
| 303 } | 310 } |
| 304 return ppd_path; | 311 return ppd_path; |
| 305 } | 312 } |
| 306 | 313 |
| 307 } // namespace printing | 314 } // namespace printing |
| OLD | NEW |