Index: printing/page_overlays.cc |
diff --git a/printing/page_overlays.cc b/printing/page_overlays.cc |
index 946186dc3bd657dec7df24961e55bf99445dfde8..e590490cf01dec54bd39931d5a90efc46795d162 100644 |
--- a/printing/page_overlays.cc |
+++ b/printing/page_overlays.cc |
@@ -137,6 +137,9 @@ std::wstring PageOverlays::ReplaceVariables(const std::wstring& input, |
const PrintedDocument& document, |
const PrintedPage& page) { |
std::wstring output(input); |
+// Prevent references to document.page_count() on Linux until |
+// printed_document.cc is included in printing.gyp. |
+#if !defined(OS_LINUX) |
for (size_t offset = output.find(L'{', 0); |
offset != std::wstring::npos; |
offset = output.find(L'{', offset)) { |
@@ -200,6 +203,7 @@ std::wstring PageOverlays::ReplaceVariables(const std::wstring& input, |
++offset; |
} |
} |
+#endif // !defined(OS_LINUX) |
return output; |
} |