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 #include "chrome/browser/bug_report_util.h" | 5 #include "chrome/browser/bug_report_util.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "base/file_version_info.h" | 8 #include "base/file_version_info.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "chrome/browser/browser_process_impl.h" | 10 #include "chrome/browser/browser_process_impl.h" |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 post_body.append("n/a\r\n"); | 181 post_body.append("n/a\r\n"); |
182 else | 182 else |
183 post_body.append(description + "\r\n"); | 183 post_body.append(description + "\r\n"); |
184 | 184 |
185 // Include the page image if we have one. | 185 // Include the page image if we have one. |
186 if (png_data != NULL && png_data_length > 0) { | 186 if (png_data != NULL && png_data_length > 0) { |
187 post_body.append("--" + mime_boundary + "\r\n"); | 187 post_body.append("--" + mime_boundary + "\r\n"); |
188 post_body.append("Content-Disposition: form-data; name=\"screenshot\"; " | 188 post_body.append("Content-Disposition: form-data; name=\"screenshot\"; " |
189 "filename=\"screenshot.png\"\r\n"); | 189 "filename=\"screenshot.png\"\r\n"); |
190 post_body.append("Content-Type: application/octet-stream\r\n"); | 190 post_body.append("Content-Type: application/octet-stream\r\n"); |
191 post_body.append(StringPrintf("Content-Length: %lu\r\n\r\n", | 191 post_body.append(StringPrintf("Content-Length: %d\r\n\r\n", |
192 png_data_length)); | 192 png_data_length)); |
193 post_body.append(png_data, png_data_length); | 193 post_body.append(png_data, png_data_length); |
194 post_body.append("\r\n"); | 194 post_body.append("\r\n"); |
195 } | 195 } |
196 | 196 |
197 // TODO(awalker): include the page source if we can get it. | 197 // TODO(awalker): include the page source if we can get it. |
198 // if (include_page_source_checkbox_->checked()) { | 198 // if (include_page_source_checkbox_->checked()) { |
199 // } | 199 // } |
200 | 200 |
201 // Terminate the body. | 201 // Terminate the body. |
(...skipping 21 matching lines...) Expand all Loading... |
223 // static | 223 // static |
224 void BugReportUtil::ReportPhishing(TabContents* currentTab, | 224 void BugReportUtil::ReportPhishing(TabContents* currentTab, |
225 const std::string& phishing_url) { | 225 const std::string& phishing_url) { |
226 currentTab->controller().LoadURL( | 226 currentTab->controller().LoadURL( |
227 safe_browsing_util::GeneratePhishingReportUrl( | 227 safe_browsing_util::GeneratePhishingReportUrl( |
228 kReportPhishingUrl, phishing_url), | 228 kReportPhishingUrl, phishing_url), |
229 GURL(), | 229 GURL(), |
230 PageTransition::LINK); | 230 PageTransition::LINK); |
231 } | 231 } |
232 | 232 |
OLD | NEW |