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

Unified Diff: chrome/utility/cloud_print/pwg_encoder.cc

Issue 145873006: ui/base/resource: Roll our own version of ReadBigEndian() function. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 10 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
« no previous file with comments | « base/big_endian_unittest.cc ('k') | cloud_print/gcp20/prototype/dns_packet_parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/utility/cloud_print/pwg_encoder.cc
diff --git a/chrome/utility/cloud_print/pwg_encoder.cc b/chrome/utility/cloud_print/pwg_encoder.cc
index 48c4c9bd7f9049f21b33b9bbb758b94fc23d1968..1e331162adf137a6f3a8e250d13aee97fedfb564 100644
--- a/chrome/utility/cloud_print/pwg_encoder.cc
+++ b/chrome/utility/cloud_print/pwg_encoder.cc
@@ -6,10 +6,10 @@
#include <algorithm>
+#include "base/big_endian.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/utility/cloud_print/bitmap_image.h"
-#include "net/base/big_endian.h"
namespace cloud_print {
@@ -66,19 +66,19 @@ void PwgEncoder::EncodePageHeader(const BitmapImage& image, const uint32 dpi,
std::string* output) const {
char header[kHeaderSize];
memset(header, 0, kHeaderSize);
- net::WriteBigEndian<uint32>(header + kHeaderHwResolutionHorizontal, dpi);
- net::WriteBigEndian<uint32>(header + kHeaderHwResolutionVertical, dpi);
- net::WriteBigEndian<uint32>(header + kHeaderCupsWidth, image.size().width());
- net::WriteBigEndian<uint32>(header + kHeaderCupsHeight,
- image.size().height());
- net::WriteBigEndian<uint32>(header + kHeaderCupsBitsPerColor, kBitsPerColor);
- net::WriteBigEndian<uint32>(header + kHeaderCupsBitsPerPixel, kBitsPerPixel);
- net::WriteBigEndian<uint32>(header + kHeaderCupsBytesPerLine,
- (kBitsPerPixel * image.size().width() + 7) / 8);
- net::WriteBigEndian<uint32>(header + kHeaderCupsColorOrder, kColorOrder);
- net::WriteBigEndian<uint32>(header + kHeaderCupsColorSpace, kColorSpace);
- net::WriteBigEndian<uint32>(header + kHeaderCupsNumColors, kNumColors);
- net::WriteBigEndian<uint32>(header + kHeaderPwgTotalPageCount, total_pages);
+ base::WriteBigEndian<uint32>(header + kHeaderHwResolutionHorizontal, dpi);
+ base::WriteBigEndian<uint32>(header + kHeaderHwResolutionVertical, dpi);
+ base::WriteBigEndian<uint32>(header + kHeaderCupsWidth, image.size().width());
+ base::WriteBigEndian<uint32>(header + kHeaderCupsHeight,
+ image.size().height());
+ base::WriteBigEndian<uint32>(header + kHeaderCupsBitsPerColor, kBitsPerColor);
+ base::WriteBigEndian<uint32>(header + kHeaderCupsBitsPerPixel, kBitsPerPixel);
+ base::WriteBigEndian<uint32>(header + kHeaderCupsBytesPerLine,
+ (kBitsPerPixel * image.size().width() + 7) / 8);
+ base::WriteBigEndian<uint32>(header + kHeaderCupsColorOrder, kColorOrder);
+ base::WriteBigEndian<uint32>(header + kHeaderCupsColorSpace, kColorSpace);
+ base::WriteBigEndian<uint32>(header + kHeaderCupsNumColors, kNumColors);
+ base::WriteBigEndian<uint32>(header + kHeaderPwgTotalPageCount, total_pages);
output->append(header, kHeaderSize);
}
« no previous file with comments | « base/big_endian_unittest.cc ('k') | cloud_print/gcp20/prototype/dns_packet_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698