summaryrefslogtreecommitdiffstats
path: root/chrome/service/cloud_print/print_system.h
diff options
context:
space:
mode:
authorsanjeevr@chromium.org <sanjeevr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-20 23:19:33 +0000
committersanjeevr@chromium.org <sanjeevr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-20 23:19:33 +0000
commit0ffeb598304f119e2d3df70d47a592d2dbc722da (patch)
tree8d1519e141a036af64cb4c943b1132060503a24f /chrome/service/cloud_print/print_system.h
parent9fc18674a68e4b4c366ffb81fb4c84b6c6bed9d2 (diff)
downloadchromium_src-0ffeb598304f119e2d3df70d47a592d2dbc722da.zip
chromium_src-0ffeb598304f119e2d3df70d47a592d2dbc722da.tar.gz
chromium_src-0ffeb598304f119e2d3df70d47a592d2dbc722da.tar.bz2
Code to send diagnostic messages about cloud print proxy. Currently diagnostic messages are sent if the print system fails to initialize (this can happen on Windows if the XPS Framework is not installed on XP) as well when printer registration fails because we could not get the capabilities for the printer.
BUG=None TEST=None Review URL: http://codereview.chromium.org/6245005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72037 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/service/cloud_print/print_system.h')
-rw-r--r--chrome/service/cloud_print/print_system.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/chrome/service/cloud_print/print_system.h b/chrome/service/cloud_print/print_system.h
index 517a665..32fa8f8 100644
--- a/chrome/service/cloud_print/print_system.h
+++ b/chrome/service/cloud_print/print_system.h
@@ -131,6 +131,20 @@ class PrintSystem : public base::RefCountedThreadSafe<PrintSystem> {
JobSpooler::Delegate* delegate) = 0;
};
+ class PrintSystemResult {
+ public:
+ PrintSystemResult(bool succeeded, const std::string& message)
+ : succeeded_(succeeded), message_(message) { }
+ bool succeeded() const { return succeeded_; }
+ std::string message() const { return message_; }
+
+ private:
+ bool succeeded_;
+ std::string message_;
+
+ PrintSystemResult() { }
+ };
+
typedef Callback3<
bool,
const std::string&,
@@ -141,7 +155,7 @@ class PrintSystem : public base::RefCountedThreadSafe<PrintSystem> {
// Initialize print system. This need to be called before any other function
// of PrintSystem.
- virtual void Init() = 0;
+ virtual PrintSystemResult Init() = 0;
// Enumerates the list of installed local and network printers.
virtual void EnumeratePrinters(printing::PrinterList* printer_list) = 0;