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

Unified Diff: chrome/browser/tab_contents/tab_contents.cc

Issue 192065: Merge 25487 - Strip .plugin off of Mac plugin names when showing the crash in... (Closed) Base URL: svn://chrome-svn/chrome/branches/195/src/
Patch Set: Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/string_util_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/tab_contents.cc
===================================================================
--- chrome/browser/tab_contents/tab_contents.cc (revision 25852)
+++ chrome/browser/tab_contents/tab_contents.cc (working copy)
@@ -9,6 +9,7 @@
#include "base/file_version_info.h"
#include "base/process_util.h"
#include "base/string16.h"
+#include "base/string_util.h"
#include "base/time.h"
#include "chrome/browser/autofill_manager.h"
#include "chrome/browser/blocked_popup_container.h"
@@ -1575,8 +1576,16 @@
FileVersionInfo::CreateFileVersionInfo(plugin_path));
if (version_info.get()) {
const std::wstring& product_name = version_info->product_name();
- if (!product_name.empty())
+ if (!product_name.empty()) {
plugin_name = product_name;
+#if defined(OS_MACOSX)
+ // Many plugins on the Mac have .plugin in the actual name, which looks
+ // terrible, so look for that and strip it off if present.
+ const std::wstring plugin_extension(L".plugin");
+ if (EndsWith(plugin_name, plugin_extension, true))
+ plugin_name.erase(plugin_name.length() - plugin_extension.length());
+#endif // OS_MACOSX
+ }
}
#else
NOTIMPLEMENTED() << " convert plugin path to plugin name";
Property changes on: chrome\browser\tab_contents\tab_contents.cc
___________________________________________________________________
Modified: svn:mergeinfo
Merged /trunk/src/chrome/browser/tab_contents/tab_contents.cc:r25487
« no previous file with comments | « base/string_util_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698