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

Unified Diff: chrome/browser/cocoa/bug_report_window_controller.mm

Issue 371057: Fix NSString conversions to treat a null NSString as a string of length 0, in... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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
Index: chrome/browser/cocoa/bug_report_window_controller.mm
===================================================================
--- chrome/browser/cocoa/bug_report_window_controller.mm (revision 31388)
+++ chrome/browser/cocoa/bug_report_window_controller.mm (working copy)
@@ -33,7 +33,6 @@
if ((self = [super initWithWindowNibPath:nibpath owner:self])) {
currentTab_ = currentTab;
profile_ = profile;
- [self setBugDescription:@""];
if (currentTab_ != NULL) {
// Get data from current tab, if one exists. This dialog could be called
@@ -69,10 +68,6 @@
l10n_util::GetNSStringWithFixup(IDS_BUGREPORT_BROWSER_CRASH),
l10n_util::GetNSStringWithFixup(IDS_BUGREPORT_OTHER_PROBLEM),
nil];
- // Because "Report Bug" is being called with no browser open in this
- // case, make URL and title empty.
- [self setPageURL:@""];
- [self setPageTitle:@""];
}
}
return self;
@@ -109,10 +104,10 @@
} else {
BugReportUtil::SendReport(
profile_,
- pageTitle_ ? base::SysNSStringToUTF8(pageTitle_) : "",
+ base::SysNSStringToUTF8(pageTitle_),
bugType_,
- pageURL_ ? base::SysNSStringToUTF8(pageURL_) : "",
- bugDescription_ ? base::SysNSStringToUTF8(bugDescription_) : "",
+ base::SysNSStringToUTF8(pageURL_),
+ base::SysNSStringToUTF8(bugDescription_),
sendScreenshot_ && !pngData_.empty() ?
reinterpret_cast<const char *>(&(pngData_[0])) : NULL,
pngData_.size());
« no previous file with comments | « base/sys_string_conversions_mac_unittest.mm ('k') | chrome/browser/cocoa/bug_report_window_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698