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

Side by Side Diff: third_party/WebKit/Source/core/dom/DocumentEncodingData.cpp

Issue 1456843002: Finch experiment: auto-detect text encoding (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments Created 5 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 28 matching lines...) Expand all
39 : m_encoding(UTF8Encoding()) 39 : m_encoding(UTF8Encoding())
40 , m_wasDetectedHeuristically(false) 40 , m_wasDetectedHeuristically(false)
41 , m_sawDecodingError(false) 41 , m_sawDecodingError(false)
42 { 42 {
43 } 43 }
44 44
45 DocumentEncodingData::DocumentEncodingData(const TextResourceDecoder& decoder) 45 DocumentEncodingData::DocumentEncodingData(const TextResourceDecoder& decoder)
46 { 46 {
47 m_encoding = decoder.encoding(); 47 m_encoding = decoder.encoding();
48 m_wasDetectedHeuristically = decoder.encodingWasDetectedHeuristically(); 48 m_wasDetectedHeuristically = decoder.encodingWasDetectedHeuristically();
49 m_attemptedToDetermineEncodingFromContentSniffing = decoder.attemptedToDeter mineEncodingFromContentSniffing();
50 m_encodingWasDetectedFromContentSniffing = decoder.encodingWasDetectedFromCo ntentSniffing();
49 m_sawDecodingError = decoder.sawError(); 51 m_sawDecodingError = decoder.sawError();
50 } 52 }
51 53
52 void DocumentEncodingData::setEncoding(const WTF::TextEncoding& encoding) 54 void DocumentEncodingData::setEncoding(const WTF::TextEncoding& encoding)
53 { 55 {
54 m_encoding = encoding; 56 m_encoding = encoding;
55 } 57 }
56 58
57 } // namespace blink 59 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698