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

Side by Side Diff: third_party/WebKit/Source/core/loader/TextResourceDecoderBuilder.cpp

Issue 2293373002: Remove unused prefs/api/resource for setPageEncoding (Closed)
Patch Set: removed unused flag/prefs Created 4 years, 3 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 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 TextResourceDecoderBuilder::~TextResourceDecoderBuilder() 127 TextResourceDecoderBuilder::~TextResourceDecoderBuilder()
128 { 128 {
129 } 129 }
130 130
131 131
132 inline std::unique_ptr<TextResourceDecoder> TextResourceDecoderBuilder::createDe coderInstance(Document* document) 132 inline std::unique_ptr<TextResourceDecoder> TextResourceDecoderBuilder::createDe coderInstance(Document* document)
133 { 133 {
134 const WTF::TextEncoding encodingFromDomain = getEncodingFromDomain(document- >url()); 134 const WTF::TextEncoding encodingFromDomain = getEncodingFromDomain(document- >url());
135 if (LocalFrame* frame = document->frame()) { 135 if (LocalFrame* frame = document->frame()) {
136 if (Settings* settings = frame->settings()) 136 if (Settings* settings = frame->settings())
137 return TextResourceDecoder::create(m_mimeType, encodingFromDomain.is Valid() ? encodingFromDomain : settings->defaultTextEncodingName(), settings->us esEncodingDetector()); 137 return TextResourceDecoder::create(m_mimeType, encodingFromDomain.is Valid() ? encodingFromDomain : settings->defaultTextEncodingName(), true);
138 } 138 }
139 139
140 return TextResourceDecoder::create(m_mimeType, encodingFromDomain); 140 return TextResourceDecoder::create(m_mimeType, encodingFromDomain);
141 } 141 }
142 142
143 inline void TextResourceDecoderBuilder::setupEncoding(TextResourceDecoder* decod er, Document* document) 143 inline void TextResourceDecoderBuilder::setupEncoding(TextResourceDecoder* decod er, Document* document)
144 { 144 {
145 LocalFrame* frame = document->frame(); 145 LocalFrame* frame = document->frame();
146 LocalFrame* parentFrame = 0; 146 LocalFrame* parentFrame = 0;
147 if (frame && frame->tree().parent() && frame->tree().parent()->isLocalFrame( )) 147 if (frame && frame->tree().parent() && frame->tree().parent()->isLocalFrame( ))
(...skipping 26 matching lines...) Expand all
174 setupEncoding(decoder.get(), document); 174 setupEncoding(decoder.get(), document);
175 return decoder; 175 return decoder;
176 } 176 }
177 177
178 void TextResourceDecoderBuilder::clear() 178 void TextResourceDecoderBuilder::clear()
179 { 179 {
180 m_encoding = nullAtom; 180 m_encoding = nullAtom;
181 } 181 }
182 182
183 } // namespace blink 183 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698