| Index: Source/core/dom/DocumentEncodingData.cpp
|
| diff --git a/Source/platform/PlatformThreadData.cpp b/Source/core/dom/DocumentEncodingData.cpp
|
| similarity index 74%
|
| copy from Source/platform/PlatformThreadData.cpp
|
| copy to Source/core/dom/DocumentEncodingData.cpp
|
| index b23dbed9d8e0a82d135e81fc75b4aef15f82d420..23d69f5ceb49e174b6a98e31f5b00a8b8d6c9c2a 100644
|
| --- a/Source/platform/PlatformThreadData.cpp
|
| +++ b/Source/core/dom/DocumentEncodingData.cpp
|
| @@ -29,35 +29,28 @@
|
| */
|
|
|
| #include "config.h"
|
| -#include "platform/PlatformThreadData.h"
|
| +#include "core/dom/DocumentEncodingData.h"
|
|
|
| -#include "platform/ThreadTimers.h"
|
| -#include "wtf/PassOwnPtr.h"
|
| -#include "wtf/ThreadSpecific.h"
|
| +#include "core/html/parser/TextResourceDecoder.h"
|
|
|
| namespace WebCore {
|
|
|
| -static ThreadSpecific<PlatformThreadData>* s_data;
|
| -
|
| -PlatformThreadData::PlatformThreadData()
|
| - : m_threadTimers(adoptPtr(new ThreadTimers))
|
| -{
|
| -}
|
| -
|
| -PlatformThreadData::~PlatformThreadData()
|
| +DocumentEncodingData::DocumentEncodingData()
|
| + : m_wasDetectedHeuristically(false)
|
| + , m_sawDecodingError(false)
|
| {
|
| }
|
|
|
| -void PlatformThreadData::destroy()
|
| +DocumentEncodingData::DocumentEncodingData(const TextResourceDecoder& decoder)
|
| {
|
| - m_threadTimers.clear();
|
| + m_encoding = decoder.encoding();
|
| + m_wasDetectedHeuristically = decoder.encodingWasDetectedHeuristically();
|
| + m_sawDecodingError = decoder.sawError();
|
| }
|
|
|
| -PlatformThreadData& PlatformThreadData::current()
|
| +void DocumentEncodingData::setEncoding(const WTF::TextEncoding& encoding)
|
| {
|
| - if (!s_data)
|
| - s_data = new ThreadSpecific<PlatformThreadData>;
|
| - return **s_data;
|
| + m_encoding = encoding;
|
| }
|
|
|
| } // namespace WebCore
|
|
|