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

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

Issue 9693064: ScopedPrinterInfoSetter on crash prone blocks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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.h ('k') | printing/backend/print_backend_cups.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 "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace printing { 9 namespace printing {
10 10
11 // Provides a stubbed out PrintBackend implementation for use on ChromeOS. 11 // Provides a stubbed out PrintBackend implementation for use on ChromeOS.
12 class PrintBackendChromeOS : public PrintBackend { 12 class PrintBackendChromeOS : public PrintBackend {
13 public: 13 public:
14 PrintBackendChromeOS(); 14 PrintBackendChromeOS();
15 virtual ~PrintBackendChromeOS() {} 15 virtual ~PrintBackendChromeOS() {}
16 16
17 // PrintBackend implementation. 17 // PrintBackend implementation.
18 virtual bool EnumeratePrinters(PrinterList* printer_list); 18 virtual bool EnumeratePrinters(PrinterList* printer_list);
19 19
20 virtual std::string GetDefaultPrinterName(); 20 virtual std::string GetDefaultPrinterName();
21 21
22 virtual bool GetPrinterCapsAndDefaults(const std::string& printer_name, 22 virtual bool GetPrinterCapsAndDefaults(const std::string& printer_name,
23 PrinterCapsAndDefaults* printer_info); 23 PrinterCapsAndDefaults* printer_info);
24 24
25 virtual bool GetPrinterDriverInfo(const std::string& printer_name, 25 virtual std::string GetPrinterDriverInfo(const std::string& printer_name);
26 std::string* driver_info);
27 26
28 virtual bool IsValidPrinter(const std::string& printer_name); 27 virtual bool IsValidPrinter(const std::string& printer_name);
29 28
30 private: 29 private:
31 }; 30 };
32 31
33 PrintBackendChromeOS::PrintBackendChromeOS() {} 32 PrintBackendChromeOS::PrintBackendChromeOS() {}
34 33
35 bool PrintBackendChromeOS::EnumeratePrinters(PrinterList* printer_list) { 34 bool PrintBackendChromeOS::EnumeratePrinters(PrinterList* printer_list) {
36 return true; 35 return true;
37 } 36 }
38 37
39 38
40 39
41 bool PrintBackendChromeOS::GetPrinterCapsAndDefaults( 40 bool PrintBackendChromeOS::GetPrinterCapsAndDefaults(
42 const std::string& printer_name, 41 const std::string& printer_name,
43 PrinterCapsAndDefaults* printer_info) { 42 PrinterCapsAndDefaults* printer_info) {
44 NOTREACHED(); 43 NOTREACHED();
45 return false; 44 return false;
46 } 45 }
47 46
48 bool PrintBackendChromeOS::GetPrinterDriverInfo(const std::string& printer_name, 47 std::string PrintBackendChromeOS::GetPrinterDriverInfo(
49 std::string* driver_info) { 48 const std::string& printer_name) {
50 NOTREACHED(); 49 NOTREACHED();
51 return false; 50 return false;
52 } 51 }
53 52
54 std::string PrintBackendChromeOS::GetDefaultPrinterName() { 53 std::string PrintBackendChromeOS::GetDefaultPrinterName() {
55 return std::string(); 54 return std::string();
56 } 55 }
57 56
58 bool PrintBackendChromeOS::IsValidPrinter(const std::string& printer_name) { 57 bool PrintBackendChromeOS::IsValidPrinter(const std::string& printer_name) {
59 NOTREACHED(); 58 NOTREACHED();
60 return true; 59 return true;
61 } 60 }
62 61
63 scoped_refptr<PrintBackend> PrintBackend::CreateInstance( 62 scoped_refptr<PrintBackend> PrintBackend::CreateInstance(
64 const base::DictionaryValue* print_backend_settings) { 63 const base::DictionaryValue* print_backend_settings) {
65 return new PrintBackendChromeOS(); 64 return new PrintBackendChromeOS();
66 } 65 }
67 66
68 } // namespace printing 67 } // namespace printing
69 68
OLDNEW
« no previous file with comments | « printing/backend/print_backend.h ('k') | printing/backend/print_backend_cups.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698