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

Unified Diff: net/base/mime_sniffer.cc

Issue 2607993002: Move some sniffer arrays to read-only data segment (Closed)
Patch Set: Created 4 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/mime_sniffer.cc
diff --git a/net/base/mime_sniffer.cc b/net/base/mime_sniffer.cc
index faa5a0d84d35cdb46f7bd414f27eb50070c77594..0b280ca70b9d8dffc2b3b431a472d25da6482f9a 100644
--- a/net/base/mime_sniffer.cc
+++ b/net/base/mime_sniffer.cc
@@ -108,11 +108,11 @@ namespace net {
static const size_t kBytesRequiredForMagic = 42;
struct MagicNumber {
- const char* const mime_type;
- const char* const magic;
+ const char* mime_type;
+ const char* magic;
size_t magic_len;
bool is_string;
- const char* const mask; // if set, must have same length as |magic|
+ const char* mask; // if set, must have same length as |magic|
};
#define MAGIC_NUMBER(mime_type, magic) \
@@ -203,7 +203,7 @@ enum OfficeDocType {
struct OfficeExtensionType {
OfficeDocType doc_type;
- const char* const extension;
+ const char* extension;
size_t extension_len;
};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698