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

Issue 197018: Strip .plugin off of Mac plugin names when showing the crash info bar. (Closed)

Created:
11 years, 3 months ago by stuartmorgan
Modified:
9 years, 7 months ago
Reviewers:
Mark Mentovai
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Strip .plugin off of Mac plugin names when showing the crash info bar. BUG=21029 TEST=Kill a plugin process; the plugin crash info bar shouldn't have ".plugin" in the plugin name. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=25487

Patch Set 1 #

Total comments: 1

Patch Set 2 : Make match tighter #

Patch Set 3 : Test suffix directly #

Total comments: 4

Patch Set 4 : Add a string utility function #

Patch Set 5 : Add a test with the match in the middle #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+47 lines, -1 line) Patch
M base/string_util.h View 1 chunk +6 lines, -0 lines 0 comments Download
M base/string_util.cc View 1 chunk +16 lines, -0 lines 0 comments Download
M base/string_util_unittest.cc View 4 1 chunk +15 lines, -0 lines 1 comment Download
M chrome/browser/tab_contents/tab_contents.cc View 1 2 3 2 chunks +10 lines, -1 line 0 comments Download

Messages

Total messages: 7 (0 generated)
stuartmorgan
11 years, 3 months ago (2009-09-03 22:46:53 UTC) #1
Mark Mentovai
LG but... http://codereview.chromium.org/197018/diff/1/2 File chrome/browser/tab_contents/tab_contents.cc (right): http://codereview.chromium.org/197018/diff/1/2#newcode1665 Line 1665: std::wstring::size_type suffix_start = plugin_name.rfind(L".plugin"); I don't ...
11 years, 3 months ago (2009-09-03 23:40:53 UTC) #2
stuartmorgan
New version up testing the suffix explicitly.
11 years, 3 months ago (2009-09-04 00:29:54 UTC) #3
Mark Mentovai
LG http://codereview.chromium.org/197018/diff/6/7 File chrome/browser/tab_contents/tab_contents.cc (right): http://codereview.chromium.org/197018/diff/6/7#newcode1671 Line 1671: plugin_name.erase(suffix_test_start); Put this inside an {} for ...
11 years, 3 months ago (2009-09-04 05:47:59 UTC) #4
Mark Mentovai
http://codereview.chromium.org/197018/diff/6/7 File chrome/browser/tab_contents/tab_contents.cc (right): http://codereview.chromium.org/197018/diff/6/7#newcode1668 Line 1668: if (suffix_test_start > 0 && Oops. std::wstring::size_type is ...
11 years, 3 months ago (2009-09-04 05:52:13 UTC) #5
stuartmorgan
Trying again, this time with a utility function and a unit test.
11 years, 3 months ago (2009-09-04 18:03:12 UTC) #6
Mark Mentovai
11 years, 3 months ago (2009-09-04 18:09:00 UTC) #7
Looks good

http://codereview.chromium.org/197018/diff/3002/10
File base/string_util_unittest.cc (right):

http://codereview.chromium.org/197018/diff/3002/10#newcode1592
Line 1592: }
I'd also add a few cases to test |str == search|, including when both are L"".

Powered by Google App Engine
This is Rietveld 408576698