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

Issue 10169004: Replace UTF16 string with UTF8 string in the |WebsiteSettings| class. (Closed)

Created:
8 years, 8 months ago by markusheintz_
Modified:
8 years, 8 months ago
Reviewers:
Finnur, wtc
CC:
chromium-reviews
Visibility:
Public.

Description

Replace UTF16 string with UTF8 string in the |WebsiteSettings| class. This safes unnecessary conversions from UTF8 to UTF16 to UTF8. See http://codereview.chromium.org/10163002/ BUG=113688 TEST=

Patch Set 1 #

Patch Set 2 : " #

Unified diffs Side-by-side diffs Delta from patch set Stats (+58 lines, -57 lines) Patch
M chrome/browser/website_settings.h View 1 3 chunks +6 lines, -7 lines 0 comments Download
M chrome/browser/website_settings.cc View 1 11 chunks +52 lines, -50 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
markusheintz_
Please review this CL. Thanks.
8 years, 8 months ago (2012-04-20 11:54:46 UTC) #1
Finnur
There is no bug and no description. What is the impetus for this? I actually ...
8 years, 8 months ago (2012-04-20 12:52:53 UTC) #2
markusheintz_
I guess I know now why this is done. And close this CL. Sorry.
8 years, 8 months ago (2012-04-20 13:35:06 UTC) #3
wtc
I don't remember why the strings in this class are UTF-16 string. Markus, since you ...
8 years, 8 months ago (2012-04-20 18:17:06 UTC) #4
markusheintz_
8 years, 8 months ago (2012-04-23 09:14:53 UTC) #5
On 2012/04/20 18:17:06, wtc wrote:
> I don't remember why the strings in this class are
> UTF-16 string.  Markus, since you figured it out,
> do you think it is worth adding a comment to to explain
> why?

The (string16 typed) strings are displayed in the UI and this is probably the
reason why they are all UTF16 strings.

For the GTK UI I need to convert the UTF16 strings to UTF8 strings. So I thought
(ignoring the views UI) I could safe some UTF string conversions. In order to
avoid unnecessary UTF string conversions I think about moving the (UI) string
creation from website_settings.cc to website_settings_popup_*.cc.

This seemed like a low hanging fruit but I will leave it as it is for now as I
have to many pressing tasks with a higher priority.

I will add some comment, saying that these strings will be displayed in the UI.

Powered by Google App Engine
This is Rietveld 408576698