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

Unified Diff: chrome/browser/local_discovery/privet_http_impl.cc

Issue 552703002: Fix compilation on Windows with enable_printing=2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mon Sep 8 17:26:04 PDT 2014 Created 6 years, 3 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/browser/local_discovery/privet_http_impl.cc
diff --git a/chrome/browser/local_discovery/privet_http_impl.cc b/chrome/browser/local_discovery/privet_http_impl.cc
index a1db1534b0e8140215d32dcb81460995b17a830b..5f90ba7de017bb7a153c2d2dc29abd27cd4541be 100644
--- a/chrome/browser/local_discovery/privet_http_impl.cc
+++ b/chrome/browser/local_discovery/privet_http_impl.cc
@@ -21,6 +21,10 @@
#include "ui/gfx/text_elider.h"
#include "url/gurl.h"
+#if defined(ENABLE_FULL_PRINTING)
+#include "chrome/browser/local_discovery/pwg_raster_converter.h"
+#endif // ENABLE_FULL_PRINTING
+
using namespace cloud_devices::printer;
namespace cloud_print {
@@ -34,6 +38,9 @@ const char kUrlPlaceHolder[] = "http://host/";
const char kPrivetRegisterActionArgName[] = "action";
const char kPrivetRegisterUserArgName[] = "user";
+const int kPrivetCancelationTimeoutSeconds = 3;
+
+#if defined(ENABLE_FULL_PRINTING)
const char kPrivetURLKeyUserName[] = "user_name";
const char kPrivetURLKeyClientName[] = "client_name";
const char kPrivetURLKeyJobname[] = "job_name";
@@ -47,13 +54,11 @@ const char kPrivetContentTypeAny[] = "*/*";
const char kPrivetKeyJobID[] = "job_id";
-const int kPrivetCancelationTimeoutSeconds = 3;
-
const int kPrivetLocalPrintMaxRetries = 2;
-
const int kPrivetLocalPrintDefaultTimeout = 5;
const size_t kPrivetLocalPrintMaxJobNameLength = 64;
+#endif // ENABLE_FULL_PRINTING
GURL CreatePrivetURL(const std::string& path) {
GURL url(kUrlPlaceHolder);
@@ -460,6 +465,7 @@ bool PrivetDataReadOperationImpl::OnRawData(PrivetURLFetcher* fetcher,
return true;
}
+#if defined(ENABLE_FULL_PRINTING)
PrivetLocalPrintOperationImpl::PrivetLocalPrintOperationImpl(
PrivetHTTPClient* privet_client,
PrivetLocalPrintOperation::Delegate* delegate)
@@ -819,6 +825,7 @@ void PrivetLocalPrintOperationImpl::SetPWGRasterConverterForTesting(
scoped_ptr<PWGRasterConverter> pwg_raster_converter) {
pwg_raster_converter_ = pwg_raster_converter.Pass();
}
+#endif // ENABLE_FULL_PRINTING
PrivetHTTPClientImpl::PrivetHTTPClientImpl(
const std::string& name,
@@ -921,8 +928,12 @@ PrivetV1HTTPClientImpl::CreateCapabilitiesOperation(
scoped_ptr<PrivetLocalPrintOperation>
PrivetV1HTTPClientImpl::CreateLocalPrintOperation(
PrivetLocalPrintOperation::Delegate* delegate) {
+#if defined(ENABLE_FULL_PRINTING)
return scoped_ptr<PrivetLocalPrintOperation>(
new PrivetLocalPrintOperationImpl(info_client(), delegate));
+#else
+ return scoped_ptr<PrivetLocalPrintOperation>();
+#endif // ENABLE_FULL_PRINTING
}
} // namespace local_discovery
« no previous file with comments | « chrome/browser/local_discovery/privet_http_impl.h ('k') | chrome/browser/local_discovery/privet_http_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698