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

Issue 267001: Separate out some more ICU from base and into base/i18n.... (Closed)

Created:
11 years, 2 months ago by brettw
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com, brettw+cc_chromium.org, ben+cc_chromium.org, John Grabowski, Paul Godavari, jam, pam+watch_chromium.org, Paweł Hajdan Jr., tim (not reviewing)
Visibility:
Public.

Description

Separate out some more ICU from base and into base/i18n. This moves string_util_icu. I moved the number formatting function into base/i18n/number_formatting and just removed the other function in string_util_icu which was TrimWhitespaceUTF8. It is only used in a few places and isn't actually helpful (and the fact that it round-trips through UTF-16 is better for the caller to see). This takes out the sorting from the FileEnumerator. The comment says the sorting is not guaranteed. I moved it into file_util_icu as a standalone function for callers of FileEnumerator to call manually if they need sorted results. I modified the directory lister to use this sorting instead, and filed a bug on doing more optimal JS-based sorting. TEST=none BUG=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=28405

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 2

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+316 lines, -539 lines) Patch
M app/l10n_util.cc View 1 chunk +1 line, -0 lines 0 comments Download
M app/os_exchange_data_provider_win.cc View 1 chunk +1 line, -1 line 0 comments Download
M base/base.gyp View 4 chunks +5 lines, -2 lines 0 comments Download
M base/file_util.h View 3 chunks +1 line, -18 lines 0 comments Download
D base/file_util_icu.cc View 1 chunk +0 lines, -129 lines 0 comments Download
M base/file_util_posix.cc View 3 chunks +0 lines, -70 lines 0 comments Download
M base/file_util_unittest.cc View 1 2 3 4 5 6 3 chunks +1 line, -88 lines 0 comments Download
A base/i18n/file_util_icu.h View 3 4 5 1 chunk +33 lines, -0 lines 0 comments Download
A + base/i18n/file_util_icu.cc View 1 2 3 4 5 6 3 chunks +72 lines, -8 lines 0 comments Download
A base/i18n/file_util_icu_unittest.cc View 3 4 5 1 chunk +71 lines, -0 lines 0 comments Download
A base/i18n/number_formatting.h View 6 1 chunk +19 lines, -0 lines 0 comments Download
A + base/i18n/number_formatting.cc View 2 chunks +9 lines, -41 lines 0 comments Download
M base/string_util.h View 2 chunks +0 lines, -5 lines 0 comments Download
D base/string_util_icu.cc View 1 chunk +0 lines, -80 lines 0 comments Download
M base/string_util_unittest.cc View 1 chunk +0 lines, -46 lines 0 comments Download
M chrome/browser/autocomplete/autocomplete.cc View 3 chunks +8 lines, -7 lines 0 comments Download
M chrome/browser/browser_about_handler.cc View 3 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/download/download_item_model.cc View 2 chunks +6 lines, -4 lines 0 comments Download
M chrome/browser/download/save_package.cc View 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/net/url_fixer_upper.cc View 1 chunk +14 lines, -0 lines 0 comments Download
M chrome/browser/shell_integration_linux.cc View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/task_manager.h View 1 2 3 4 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/task_manager.cc View 7 chunks +11 lines, -12 lines 0 comments Download
M chrome/browser/views/new_profile_dialog.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/tools/convert_dict/hunspell_reader.cc View 1 chunk +4 lines, -1 line 0 comments Download
M net/base/directory_lister.h View 2 chunks +4 lines, -4 lines 0 comments Download
M net/base/directory_lister.cc View 2 3 4 3 chunks +38 lines, -10 lines 0 comments Download
M net/base/net_util.cc View 1 chunk +1 line, -0 lines 0 comments Download
M printing/printed_document.cc View 2 chunks +2 lines, -1 line 0 comments Download
M printing/printing_context_win.cc View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M webkit/glue/webplugin_impl.cc View 2 chunks +2 lines, -3 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
brettw
This makes Linux & Mac directory lists unsorted. I'm checking with Darin about this and ...
11 years, 2 months ago (2009-10-07 03:50:13 UTC) #1
darin (slow to review)
I'm fine with either doing sorting in the DirectoryLister or in JavaScript within the directory ...
11 years, 2 months ago (2009-10-07 04:41:08 UTC) #2
brettw
11 years, 2 months ago (2009-10-07 17:54:50 UTC) #3
Sean Parent
11 years, 2 months ago (2009-10-07 19:32:18 UTC) #4
You have a couple of lint errors and I had a couple of minor comments.

Otherwise - LGTM.

http://codereview.chromium.org/267001/diff/100/4032
File chrome/browser/task_manager.h (right):

http://codereview.chromium.org/267001/diff/100/4032#newcode318
Line 318: // Given a string containing a number, this function returns the
formatted
The comment doesn't appear to have been updated with the function.

http://codereview.chromium.org/267001/diff/100/4039
File net/base/directory_lister.cc (right):

http://codereview.chromium.org/267001/diff/100/4039#newcode28
Line 28: if (!data.empty()) {
Minor - I don't like double negatives where they can be avoided. You might also
consider avoiding the else clause with an early return:

if (data.empty()) {
  lister->OnDone(error);
  return;
}

lister->OnReceivedData(...);

Powered by Google App Engine
This is Rietveld 408576698