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/ui/cocoa/bug_report_window_controller.h" | 5 #import "chrome/browser/ui/cocoa/bug_report_window_controller.h" |
6 | 6 |
7 #include "base/mac/mac_util.h" | 7 #include "base/mac/mac_util.h" |
8 #include "base/sys_string_conversions.h" | 8 #include "base/sys_string_conversions.h" |
9 #include "chrome/browser/bug_report_util.h" | 9 #include "chrome/browser/bug_report_util.h" |
10 #include "chrome/browser/tab_contents/tab_contents.h" | 10 #include "chrome/browser/tab_contents/tab_contents.h" |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 [NSApp runModalForWindow:bugReportWindow]; | 103 [NSApp runModalForWindow:bugReportWindow]; |
104 } | 104 } |
105 | 105 |
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_), | |
114 [self bugTypeFromIndex], | 113 [self bugTypeFromIndex], |
115 base::SysNSStringToUTF8(pageURL_), | 114 base::SysNSStringToUTF8(pageURL_), |
116 base::SysNSStringToUTF8(bugDescription_), | 115 base::SysNSStringToUTF8(bugDescription_), |
117 sendScreenshot_ && !pngData_.empty() ? | 116 sendScreenshot_ && !pngData_.empty() ? |
118 reinterpret_cast<const char *>(&(pngData_[0])) : NULL, | 117 reinterpret_cast<const char *>(&(pngData_[0])) : NULL, |
119 pngData_.size(), pngWidth_, pngHeight_); | 118 pngData_.size(), pngWidth_, pngHeight_); |
120 } | 119 } |
121 [self closeDialog]; | 120 [self closeDialog]; |
122 } | 121 } |
123 | 122 |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 + (NSSet*)keyPathsForValuesAffectingValueForKey:(NSString*)key { | 221 + (NSSet*)keyPathsForValuesAffectingValueForKey:(NSString*)key { |
223 NSSet* paths = [super keyPathsForValuesAffectingValueForKey:key]; | 222 NSSet* paths = [super keyPathsForValuesAffectingValueForKey:key]; |
224 if ([key isEqualToString:@"isPhishingReport"]) { | 223 if ([key isEqualToString:@"isPhishingReport"]) { |
225 paths = [paths setByAddingObject:@"bugTypeIndex"]; | 224 paths = [paths setByAddingObject:@"bugTypeIndex"]; |
226 } | 225 } |
227 return paths; | 226 return paths; |
228 } | 227 } |
229 | 228 |
230 @end | 229 @end |
231 | 230 |
OLD | NEW |