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

Unified Diff: ui/base/resource/resource_bundle.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: fix for gcp20_device 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
Index: ui/base/resource/resource_bundle.cc
diff --git a/ui/base/resource/resource_bundle.cc b/ui/base/resource/resource_bundle.cc
index 42367f7183254fcd8d28feb0d9254a52ea3d742d..4a4233c1716f709b65002a248b3c88095a4fca81 100644
--- a/ui/base/resource/resource_bundle.cc
+++ b/ui/base/resource/resource_bundle.cc
@@ -6,6 +6,7 @@
#include <vector>
+#include "base/big_endian.h"
#include "base/command_line.h"
#include "base/file_util.h"
#include "base/logging.h"
@@ -18,7 +19,6 @@
#include "base/synchronization/lock.h"
#include "build/build_config.h"
#include "grit/app_locale_settings.h"
-#include "net/base/big_endian.h"
#include "skia/ext/image_operations.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/base/l10n/l10n_util.h"
@@ -763,7 +763,7 @@ bool ResourceBundle::ShouldHighlightMissingScaledResources() {
// static
bool ResourceBundle::PNGContainsFallbackMarker(const unsigned char* buf,
- size_t size) {
+ size_t size) {
if (size < arraysize(kPngMagic) ||
memcmp(buf, kPngMagic, arraysize(kPngMagic)) != 0) {
// Data invalid or a JPEG.
@@ -777,7 +777,7 @@ bool ResourceBundle::PNGContainsFallbackMarker(const unsigned char* buf,
if (size - pos < kPngChunkMetadataSize)
break;
uint32 length = 0;
- net::ReadBigEndian(reinterpret_cast<const char*>(buf + pos), &length);
+ base::ReadBigEndian(reinterpret_cast<const char*>(buf + pos), &length);
if (size - pos - kPngChunkMetadataSize < length)
break;
if (length == 0 && memcmp(buf + pos + sizeof(uint32), kPngScaleChunkType,

Powered by Google App Engine
This is Rietveld 408576698