OLD | NEW |
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 "chrome/service/cloud_print/print_system.h" | 5 #include "chrome/service/cloud_print/print_system.h" |
6 | 6 |
7 #include <cups/cups.h> | 7 #include <cups/cups.h> |
8 #include <dlfcn.h> | 8 #include <dlfcn.h> |
9 #include <errno.h> | 9 #include <errno.h> |
10 #include <pthread.h> | 10 #include <pthread.h> |
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 bool notify_delete = true; | 427 bool notify_delete = true; |
428 if (print_system_settings->GetBoolean(kCUPSNotifyDelete, ¬ify_delete)) | 428 if (print_system_settings->GetBoolean(kCUPSNotifyDelete, ¬ify_delete)) |
429 notify_delete_ = notify_delete; | 429 notify_delete_ = notify_delete; |
430 } | 430 } |
431 | 431 |
432 InitPrintBackends(print_system_settings); | 432 InitPrintBackends(print_system_settings); |
433 } | 433 } |
434 | 434 |
435 void PrintSystemCUPS::InitPrintBackends( | 435 void PrintSystemCUPS::InitPrintBackends( |
436 const DictionaryValue* print_system_settings) { | 436 const DictionaryValue* print_system_settings) { |
437 ListValue* url_list; | 437 const ListValue* url_list; |
438 if (print_system_settings && | 438 if (print_system_settings && |
439 print_system_settings->GetList(kCUPSPrintServerURLs, &url_list)) { | 439 print_system_settings->GetList(kCUPSPrintServerURLs, &url_list)) { |
440 for (size_t i = 0; i < url_list->GetSize(); i++) { | 440 for (size_t i = 0; i < url_list->GetSize(); i++) { |
441 std::string print_server_url; | 441 std::string print_server_url; |
442 if (url_list->GetString(i, &print_server_url)) | 442 if (url_list->GetString(i, &print_server_url)) |
443 AddPrintServer(print_server_url); | 443 AddPrintServer(print_server_url); |
444 } | 444 } |
445 } | 445 } |
446 | 446 |
447 // If server list is empty, use default print server. | 447 // If server list is empty, use default print server. |
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
865 | 865 |
866 void PrintSystemCUPS::RunCapsCallback( | 866 void PrintSystemCUPS::RunCapsCallback( |
867 const PrinterCapsAndDefaultsCallback& callback, | 867 const PrinterCapsAndDefaultsCallback& callback, |
868 bool succeeded, | 868 bool succeeded, |
869 const std::string& printer_name, | 869 const std::string& printer_name, |
870 const printing::PrinterCapsAndDefaults& printer_info) { | 870 const printing::PrinterCapsAndDefaults& printer_info) { |
871 callback.Run(succeeded, printer_name, printer_info); | 871 callback.Run(succeeded, printer_name, printer_info); |
872 } | 872 } |
873 | 873 |
874 } // namespace cloud_print | 874 } // namespace cloud_print |
OLD | NEW |