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

Side by Side Diff: third_party/WebKit/Source/modules/encoding/TextDecoder.cpp

Issue 2392443007: reflow comments in modules/[app_banner,encoding] (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « third_party/WebKit/Source/modules/encoding/Encoding.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 : m_encoding(encoding), 61 : m_encoding(encoding),
62 m_codec(newTextCodec(encoding)), 62 m_codec(newTextCodec(encoding)),
63 m_fatal(fatal), 63 m_fatal(fatal),
64 m_ignoreBOM(ignoreBOM), 64 m_ignoreBOM(ignoreBOM),
65 m_bomSeen(false) {} 65 m_bomSeen(false) {}
66 66
67 TextDecoder::~TextDecoder() {} 67 TextDecoder::~TextDecoder() {}
68 68
69 String TextDecoder::encoding() const { 69 String TextDecoder::encoding() const {
70 String name = String(m_encoding.name()).lower(); 70 String name = String(m_encoding.name()).lower();
71 // Where possible, encoding aliases should be handled by changes to Chromium's ICU or Blink's WTF. 71 // Where possible, encoding aliases should be handled by changes to Chromium's
72 // The same codec is used, but WTF maintains a different name/identity for the se. 72 // ICU or Blink's WTF. The same codec is used, but WTF maintains a different
73 // name/identity for these.
73 if (name == "iso-8859-1" || name == "us-ascii") 74 if (name == "iso-8859-1" || name == "us-ascii")
74 return "windows-1252"; 75 return "windows-1252";
75 return name; 76 return name;
76 } 77 }
77 78
78 String TextDecoder::decode(const BufferSource& input, 79 String TextDecoder::decode(const BufferSource& input,
79 const TextDecodeOptions& options, 80 const TextDecodeOptions& options,
80 ExceptionState& exceptionState) { 81 ExceptionState& exceptionState) {
81 ASSERT(!input.isNull()); 82 ASSERT(!input.isNull());
82 if (input.isArrayBufferView()) { 83 if (input.isArrayBufferView()) {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 120
120 return s; 121 return s;
121 } 122 }
122 123
123 String TextDecoder::decode(ExceptionState& exceptionState) { 124 String TextDecoder::decode(ExceptionState& exceptionState) {
124 TextDecodeOptions options; 125 TextDecodeOptions options;
125 return decode(nullptr, 0, options, exceptionState); 126 return decode(nullptr, 0, options, exceptionState);
126 } 127 }
127 128
128 } // namespace blink 129 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/encoding/Encoding.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698