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

Unified Diff: chrome/service/cloud_print/print_system_win.cc

Issue 6245005: Code to send diagnostic messages about cloud print proxy. Currently diagnosti... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Fixed build errors yet again Created 9 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/service/cloud_print/print_system_win.cc
===================================================================
--- chrome/service/cloud_print/print_system_win.cc (revision 70946)
+++ chrome/service/cloud_print/print_system_win.cc (working copy)
@@ -7,6 +7,7 @@
#include <objidl.h>
#include <winspool.h>
+#include "app/l10n_util.h"
#include "base/file_path.h"
#include "base/scoped_ptr.h"
#include "base/utf_string_conversions.h"
@@ -18,6 +19,7 @@
#include "chrome/service/service_process.h"
#include "chrome/service/service_utility_process_host.h"
#include "gfx/rect.h"
+#include "grit/generated_resources.h"
#include "printing/backend/print_backend.h"
#include "printing/backend/print_backend_consts.h"
#include "printing/backend/win_helper.h"
@@ -246,7 +248,7 @@
PrintSystemWin();
// PrintSystem implementation.
- virtual void Init();
+ virtual PrintSystemResult Init();
virtual void EnumeratePrinters(printing::PrinterList* printer_list);
@@ -594,7 +596,13 @@
print_backend_ = printing::PrintBackend::CreateInstance(NULL);
}
-void PrintSystemWin::Init() {
+PrintSystem::PrintSystemResult PrintSystemWin::Init() {
+ if (!printing::XPSModule::Init()) {
+ std::string message = l10n_util::GetStringUTF8(
+ IDS_CLOUD_PRINT_XPS_UNAVAILABLE);
+ return PrintSystemResult(false, message);
+ }
+ return PrintSystemResult(true, std::string());
}
void PrintSystemWin::EnumeratePrinters(printing::PrinterList* printer_list) {

Powered by Google App Engine
This is Rietveld 408576698