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

Issue 420001: Ignore UTF-8's BOM when parsing userscript's metadata. (Closed)

Created:
11 years, 1 month ago by hayato
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Ignore UTF-8's BOM when parsing userscript's metadata. BUG=27333 TEST=UserScriptTest and check the issue does not happen against userscipt encoded in UTF-8 with BOM.. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=33048

Patch Set 1 #

Total comments: 5

Patch Set 2 : Reflect the review #

Patch Set 3 : Add unittest #

Total comments: 4

Patch Set 4 : Relect the review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+25 lines, -1 line) Patch
M base/string_util.h View 1 chunk +2 lines, -0 lines 0 comments Download
M base/string_util.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/extensions/user_script_master.cc View 2 3 1 chunk +6 lines, -1 line 0 comments Download
M chrome/browser/extensions/user_script_master_unittest.cc View 3 1 chunk +15 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
hayato
Hi Aaron, Could you review this?
11 years, 1 month ago (2009-11-20 10:00:13 UTC) #1
Aaron Boodman
+jsin Jungshik, do you know if we have any code in Chromium already that can ...
11 years, 1 month ago (2009-11-20 22:46:15 UTC) #2
jungshik at Google
http://codereview.chromium.org/420001/diff/1/2 File chrome/common/extensions/user_script.cc (right): http://codereview.chromium.org/420001/diff/1/2#newcode69 Line 69: content->starts_with(kUtf8ByteOrderMark)) On 2009/11/20 22:46:15, Aaron Boodman wrote: > ...
11 years, 1 month ago (2009-11-20 23:58:14 UTC) #3
hayato
Thank you for the review. I rewrote this change completely as you suggested. Now, I ...
11 years, 1 month ago (2009-11-24 09:08:07 UTC) #4
Aaron Boodman
LGTM with two nits. http://codereview.chromium.org/420001/diff/6001/6004 File chrome/browser/extensions/user_script_master.cc (right): http://codereview.chromium.org/420001/diff/6001/6004#newcode49 chrome/browser/extensions/user_script_master.cc:49: // Skip UTF-8's BOM. Nit: ...
11 years, 1 month ago (2009-11-24 20:33:39 UTC) #5
hayato
11 years, 1 month ago (2009-11-25 03:31:19 UTC) #6
Thank you for the review. I'll land this.

http://codereview.chromium.org/420001/diff/6001/6004
File chrome/browser/extensions/user_script_master.cc (right):

http://codereview.chromium.org/420001/diff/6001/6004#newcode49
chrome/browser/extensions/user_script_master.cc:49: // Skip UTF-8's BOM.
On 2009/11/24 20:33:39, Aaron Boodman wrote:
> Nit: can you add newlines before and after this new chunk of logic?

Done.

http://codereview.chromium.org/420001/diff/6001/6004#newcode52
chrome/browser/extensions/user_script_master.cc:52: size_t line_end = 0;
On 2009/11/24 20:33:39, Aaron Boodman wrote:
> Nit: it would be more clear to initialize this to line_start.

Done.

Powered by Google App Engine
This is Rietveld 408576698