diff options
author | abarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-16 06:34:56 +0000 |
---|---|---|
committer | abarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-16 06:34:56 +0000 |
commit | 2e7aff66fe443c29b2fc14a776dca5512b0b4729 (patch) | |
tree | 0195994507e51a675c488718dd50e7bd997d889f /net/base/mime_sniffer.h | |
parent | 791199c674cd1aa2997e39079e33681596866fc8 (diff) | |
download | chromium_src-2e7aff66fe443c29b2fc14a776dca5512b0b4729.zip chromium_src-2e7aff66fe443c29b2fc14a776dca5512b0b4729.tar.gz chromium_src-2e7aff66fe443c29b2fc14a776dca5512b0b4729.tar.bz2 |
Increase the mime sniffer's limit for searching for binary looking bytes from
512 to 1024 bytes.
Contributed by tonyg@chromium.org
BUG=15314
TEST=net_unittests --gtest_filter=MimeSnifferTest.LooksBinary
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41687 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/mime_sniffer.h')
-rw-r--r-- | net/base/mime_sniffer.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/net/base/mime_sniffer.h b/net/base/mime_sniffer.h index 6fd7014..d0c4e78 100644 --- a/net/base/mime_sniffer.h +++ b/net/base/mime_sniffer.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -11,6 +11,12 @@ class GURL; namespace net { +// The maximum number of bytes used by any internal mime sniffing routine. May +// be useful for callers to determine an efficient buffer size to pass to +// |SniffMimeType|. +// This must be updated if any internal sniffing routine needs more bytes. +const int kMaxBytesToSniff = 1024; + // Examine the URL and the mime_type and decide whether we should sniff a // replacement mime type from the content. // |