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

Issue 6246036: FilePath: Remove most of ToWStringHack, adding a LossyDisplayName() (Closed)

Created:
9 years, 10 months ago by Evan Martin
Modified:
9 years, 7 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, stuartmorgan+watch_chromium.org, Erik does not do reviews, brettw-cc_chromium.org, jam, Aaron Boodman, pam+watch_chromium.org, rdsmith+dwatch_chromium.org, Paweł Hajdan Jr., darin-cc_chromium.org, davemoore+watch_chromium.org
Visibility:
Public.

Description

FilePath: Remove much of ToWStringHack, adding a LossyDisplayName() The reason we don't want a free conversion between FilePaths and Unicode is that it can be lossy. But when displaying a string to the user, we're ok if it's lossy when we have no other option. This change introduces a LossyDisplayName() method that returns a string16, and converts many of the users of ToWStringHack to use it. BUG=69467 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=73840

Patch Set 1 #

Total comments: 13

Patch Set 2 : retry #

Total comments: 16

Patch Set 3 : fixes #

Patch Set 4 : fix #

Patch Set 5 : bug link #

Unified diffs Side-by-side diffs Delta from patch set Stats (+119 lines, -91 lines) Patch
M base/file_path.h View 2 chunks +9 lines, -0 lines 0 comments Download
M base/file_path.cc View 2 chunks +11 lines, -3 lines 0 comments Download
M base/file_util_unittest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/options/wifi_config_view.cc View 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/browser/diagnostics/recon_diagnostics.cc View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/download/download_browsertest.cc View 1 2 3 chunks +13 lines, -11 lines 0 comments Download
M chrome/browser/download/download_item.cc View 1 2 3 4 1 chunk +6 lines, -2 lines 0 comments Download
M chrome/browser/download/download_uitest.cc View 3 chunks +8 lines, -6 lines 0 comments Download
M chrome/browser/extensions/extension_service.cc View 1 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/first_run/first_run.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/plugin_observer.cc View 1 2 1 chunk +7 lines, -7 lines 0 comments Download
M chrome/browser/plugin_service.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/printing/printing_layout_uitest.cc View 2 chunks +10 lines, -10 lines 0 comments Download
M chrome/browser/process_singleton_win.cc View 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/options/advanced_contents_view.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/shell_dialogs_win.cc View 1 chunk +4 lines, -5 lines 0 comments Download
M chrome/browser/ui/views/user_data_dir_dialog.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/common/extensions/extension.cc View 1 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/common/extensions/extension_file_util.cc View 1 2 3 10 chunks +21 lines, -15 lines 0 comments Download
M chrome/common/sandbox_policy.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/common/zip.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/test/mini_installer_test/chrome_mini_installer.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/ui/ui_test_suite.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/tools/crash_service/main.cc View 1 chunk +1 line, -1 line 0 comments Download
M printing/printed_document.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M views/drag_utils.cc View 1 chunk +1 line, -1 line 0 comments Download
M webkit/plugins/npapi/plugin_list_win.cc View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
Evan Martin
We discussed this earlier. I'd appreciate your feedback. I was hoping I could do a ...
9 years, 10 months ago (2011-02-01 22:29:23 UTC) #1
Evan Martin
http://codereview.chromium.org/6246036/diff/1/chrome/browser/chrome_plugin_host.cc File chrome/browser/chrome_plugin_host.cc (right): http://codereview.chromium.org/6246036/diff/1/chrome/browser/chrome_plugin_host.cc#newcode470 chrome/browser/chrome_plugin_host.cc:470: path.Append(chrome::kChromePluginDataDirname).LossyDisplayName()); In retrospect, as a way of asserting this ...
9 years, 10 months ago (2011-02-01 22:31:23 UTC) #2
Mark Mentovai
I’m not able to complete the review right now because codereview is so bad. Here’s ...
9 years, 10 months ago (2011-02-01 22:42:44 UTC) #3
Avi (use Gerrit)
I'm not entirely comfortable here. LossyDisplayName is supposed to be for display but that's not ...
9 years, 10 months ago (2011-02-01 22:46:25 UTC) #4
Mark Mentovai
I guess we’re hoping that each new hack is a hack in fewer places than ...
9 years, 10 months ago (2011-02-01 22:54:55 UTC) #5
Evan Martin
In the interest of making progress on this, I reverted (or at least attempted to ...
9 years, 10 months ago (2011-02-04 19:04:30 UTC) #6
Evan Martin
Oh, and to answer Mark's questions: 16To8(displayname) does seem a bit silly on OSX because ...
9 years, 10 months ago (2011-02-04 19:07:07 UTC) #7
Evan Martin
On 2011/02/04 19:07:07, Evan Martin wrote: > 16To8(displayname) does seem a bit silly on OSX ...
9 years, 10 months ago (2011-02-04 19:10:05 UTC) #8
Mark Mentovai
evan@chromium.org wrote: > Oh, and to answer Mark's questions: > > 16To8(displayname) does seem a ...
9 years, 10 months ago (2011-02-04 19:17:28 UTC) #9
Avi (use Gerrit)
Almost scandal-free. http://codereview.chromium.org/6246036/diff/1044/chrome/browser/download/download_browsertest.cc File chrome/browser/download/download_browsertest.cc (right): http://codereview.chromium.org/6246036/diff/1044/chrome/browser/download/download_browsertest.cc#newcode373 chrome/browser/download/download_browsertest.cc:373: // |expected_title_in_finished| need to be checked. Nitpicky ...
9 years, 10 months ago (2011-02-04 19:24:52 UTC) #10
Mark Mentovai
http://codereview.chromium.org/6246036/diff/1044/chrome/browser/download/download_item.cc File chrome/browser/download/download_item.cc (right): http://codereview.chromium.org/6246036/diff/1044/chrome/browser/download/download_item.cc#newcode490 chrome/browser/download/download_item.cc:490: if (path.find(query) != std::wstring::npos) string16::find doesn’t seem like the ...
9 years, 10 months ago (2011-02-04 19:26:58 UTC) #11
evanm
New version up, also with a Mac compile fix. http://codereview.chromium.org/6246036/diff/1044/chrome/browser/download/download_browsertest.cc File chrome/browser/download/download_browsertest.cc (right): http://codereview.chromium.org/6246036/diff/1044/chrome/browser/download/download_browsertest.cc#newcode373 chrome/browser/download/download_browsertest.cc:373: ...
9 years, 10 months ago (2011-02-04 19:37:11 UTC) #12
Avi (use Gerrit)
http://codereview.chromium.org/6246036/diff/1044/chrome/browser/download/download_item.cc File chrome/browser/download/download_item.cc (right): http://codereview.chromium.org/6246036/diff/1044/chrome/browser/download/download_item.cc#newcode490 chrome/browser/download/download_item.cc:490: if (path.find(query) != std::wstring::npos) For strict substring, this is ...
9 years, 10 months ago (2011-02-04 19:42:32 UTC) #13
Mark Mentovai
http://codereview.chromium.org/6246036/diff/1044/chrome/browser/download/download_item.cc File chrome/browser/download/download_item.cc (right): http://codereview.chromium.org/6246036/diff/1044/chrome/browser/download/download_item.cc#newcode490 chrome/browser/download/download_item.cc:490: if (path.find(query) != std::wstring::npos) evanm wrote: > I guess ...
9 years, 10 months ago (2011-02-04 19:49:32 UTC) #14
evanm
http://codereview.chromium.org/6246036/diff/1044/chrome/browser/download/download_item.cc File chrome/browser/download/download_item.cc (right): http://codereview.chromium.org/6246036/diff/1044/chrome/browser/download/download_item.cc#newcode490 chrome/browser/download/download_item.cc:490: if (path.find(query) != std::wstring::npos) On 2011/02/04 19:49:32, Mark Mentovai ...
9 years, 10 months ago (2011-02-04 19:58:49 UTC) #15
Avi (use Gerrit)
On 2011/02/04 19:58:49, evanm wrote: > I filed 71980. Are you saying you want me ...
9 years, 10 months ago (2011-02-04 20:02:01 UTC) #16
Mark Mentovai
9 years, 10 months ago (2011-02-04 20:20:54 UTC) #17
Let’s call this LGTM and move on to scarier things.

Powered by Google App Engine
This is Rietveld 408576698