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

Issue 5631002: wstrings: convert CppVariant and CppBoundClass to not use wstring (Closed)

Created:
10 years ago by Evan Martin
Modified:
10 years ago
Reviewers:
viettrungluu
CC:
chromium-reviews, pam+watch_chromium.org, Paweł Hajdan Jr., darin-cc_chromium.org, brettw-cc_chromium.org
Visibility:
Public.

Description

wstrings: convert CppVariant and CppBoundClass to not use wstring Confusingly, we had a ToString() that returned a UTF-8 string and a ToStringVector() that returned wstrings. Since CppVariant is a small wrapper around NPVariant I made them both use UTF-8; it simplified most of the users anyway (which only dealt with ASCII anyway). BUG=23581 TEST=compiles Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=68187

Patch Set 1 #

Total comments: 7
Unified diffs Side-by-side diffs Delta from patch set Stats (+39 lines, -46 lines) Patch
M chrome/renderer/blocked_plugin.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/renderer/dom_ui_bindings.cc View 2 chunks +2 lines, -6 lines 1 comment Download
M chrome/renderer/external_host_bindings.h View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/renderer/render_view.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M webkit/glue/cpp_bound_class.h View 1 chunk +1 line, -2 lines 0 comments Download
M webkit/glue/cpp_bound_class.cc View 2 chunks +2 lines, -2 lines 1 comment Download
M webkit/glue/cpp_bound_class_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M webkit/glue/cpp_variant.h View 2 chunks +2 lines, -1 line 2 comments Download
M webkit/glue/cpp_variant.cc View 3 chunks +4 lines, -5 lines 1 comment Download
webkit/tools/test_shell/accessibility_controller.h View 1 chunk +1 line, -2 lines 0 comments Download
M webkit/tools/test_shell/accessibility_controller.cc View 1 chunk +1 line, -1 line 0 comments Download
M webkit/tools/test_shell/event_sending_controller.cc View 5 chunks +15 lines, -15 lines 2 comments Download
M webkit/tools/test_shell/test_shell.cc View 1 chunk +5 lines, -5 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
Evan Martin
This fixes a vtl TODO
10 years ago (2010-12-03 00:54:31 UTC) #1
viettrungluu
10 years ago (2010-12-03 02:00:16 UTC) #2
LGTM with a few small nits. Thanks.

http://codereview.chromium.org/5631002/diff/1/chrome/renderer/dom_ui_bindings.cc
File chrome/renderer/dom_ui_bindings.cc (right):

http://codereview.chromium.org/5631002/diff/1/chrome/renderer/dom_ui_bindings...
chrome/renderer/dom_ui_bindings.cc:49: }
You can probably omit the braces as well. (I don't care much either way, but it
seems to be in keeping with the style in this file.)

http://codereview.chromium.org/5631002/diff/1/webkit/glue/cpp_bound_class.cc
File webkit/glue/cpp_bound_class.cc (right):

http://codereview.chromium.org/5631002/diff/1/webkit/glue/cpp_bound_class.cc#...
webkit/glue/cpp_bound_class.cc:331:
frame->bindToWindowObject(ASCIIToUTF16(classname),
I was going to say that maybe we should be using UTF8ToUTF16(), but I guess it
has to be a legal name is JS....

http://codereview.chromium.org/5631002/diff/1/webkit/glue/cpp_variant.cc
File webkit/glue/cpp_variant.cc (right):

http://codereview.chromium.org/5631002/diff/1/webkit/glue/cpp_variant.cc#newc...
webkit/glue/cpp_variant.cc:244: string_vector.push_back(string);
Reading the code, I suppose it's clear that this is at least as right as what we
used to have.

http://codereview.chromium.org/5631002/diff/1/webkit/glue/cpp_variant.h
File webkit/glue/cpp_variant.h (right):

http://codereview.chromium.org/5631002/diff/1/webkit/glue/cpp_variant.h#newco...
webkit/glue/cpp_variant.h:25: #include "base/string16.h"
Why do you need this?

http://codereview.chromium.org/5631002/diff/1/webkit/glue/cpp_variant.h#newco...
webkit/glue/cpp_variant.h:100: std::vector<std::string> ToStringVector() const;
This sort of thing always worries me, since JS strings need not be real Unicode
(AFAIK, they're just strings of 16-bit numbers, really), but I think we handle
this "properly", whatever that means (since V8 stores strings as UTF-8(ish?)).

http://codereview.chromium.org/5631002/diff/1/webkit/tools/test_shell/event_s...
File webkit/tools/test_shell/event_sending_controller.cc (right):

http://codereview.chromium.org/5631002/diff/1/webkit/tools/test_shell/event_s...
webkit/tools/test_shell/event_sending_controller.cc:160: } else if (key ==
"shiftKey"
Nit: reformat with standard style?

http://codereview.chromium.org/5631002/diff/1/webkit/tools/test_shell/event_s...
webkit/tools/test_shell/event_sending_controller.cc:174: } else if (key ==
"metaKey"
"

Powered by Google App Engine
This is Rietveld 408576698