OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #import "chrome/browser/cocoa/bug_report_window_controller.h" | 5 #import "chrome/browser/cocoa/bug_report_window_controller.h" |
6 | 6 |
7 #include "app/l10n_util_mac.h" | 7 #include "app/l10n_util_mac.h" |
8 #include "base/mac_util.h" | 8 #include "base/mac_util.h" |
9 #include "base/sys_string_conversions.h" | 9 #include "base/sys_string_conversions.h" |
10 #include "chrome/browser/bug_report_util.h" | 10 #include "chrome/browser/bug_report_util.h" |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 - (IBAction)sendReport:(id)sender { | 106 - (IBAction)sendReport:(id)sender { |
107 if ([self isPhishingReport]) { | 107 if ([self isPhishingReport]) { |
108 BugReportUtil::ReportPhishing(currentTab_, | 108 BugReportUtil::ReportPhishing(currentTab_, |
109 pageURL_ ? base::SysNSStringToUTF8(pageURL_) : ""); | 109 pageURL_ ? base::SysNSStringToUTF8(pageURL_) : ""); |
110 } else { | 110 } else { |
111 BugReportUtil::SendReport( | 111 BugReportUtil::SendReport( |
112 profile_, | 112 profile_, |
113 base::SysNSStringToUTF8(pageTitle_), | 113 base::SysNSStringToUTF8(pageTitle_), |
114 [self bugTypeFromIndex], | 114 [self bugTypeFromIndex], |
115 base::SysNSStringToUTF8(pageURL_), | 115 base::SysNSStringToUTF8(pageURL_), |
116 std::string(), | |
117 base::SysNSStringToUTF8(bugDescription_), | 116 base::SysNSStringToUTF8(bugDescription_), |
118 sendScreenshot_ && !pngData_.empty() ? | 117 sendScreenshot_ && !pngData_.empty() ? |
119 reinterpret_cast<const char *>(&(pngData_[0])) : NULL, | 118 reinterpret_cast<const char *>(&(pngData_[0])) : NULL, |
120 pngData_.size(), pngWidth_, pngHeight_); | 119 pngData_.size(), pngWidth_, pngHeight_); |
121 } | 120 } |
122 [self closeDialog]; | 121 [self closeDialog]; |
123 } | 122 } |
124 | 123 |
125 - (IBAction)cancel:(id)sender { | 124 - (IBAction)cancel:(id)sender { |
126 [self closeDialog]; | 125 [self closeDialog]; |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 + (NSSet*)keyPathsForValuesAffectingValueForKey:(NSString*)key { | 222 + (NSSet*)keyPathsForValuesAffectingValueForKey:(NSString*)key { |
224 NSSet* paths = [super keyPathsForValuesAffectingValueForKey:key]; | 223 NSSet* paths = [super keyPathsForValuesAffectingValueForKey:key]; |
225 if ([key isEqualToString:@"isPhishingReport"]) { | 224 if ([key isEqualToString:@"isPhishingReport"]) { |
226 paths = [paths setByAddingObject:@"bugTypeIndex"]; | 225 paths = [paths setByAddingObject:@"bugTypeIndex"]; |
227 } | 226 } |
228 return paths; | 227 return paths; |
229 } | 228 } |
230 | 229 |
231 @end | 230 @end |
232 | 231 |
OLD | NEW |