| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <sstream> | 7 #include <sstream> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 (response_code < kHttpPostFailServerError)) { | 130 (response_code < kHttpPostFailServerError)) { |
| 131 error_stream << "Client error: HTTP response code " << response_code; | 131 error_stream << "Client error: HTTP response code " << response_code; |
| 132 } else if (response_code > kHttpPostFailServerError) { | 132 } else if (response_code > kHttpPostFailServerError) { |
| 133 error_stream << "Server error: HTTP response code " << response_code; | 133 error_stream << "Server error: HTTP response code " << response_code; |
| 134 } else { | 134 } else { |
| 135 error_stream << "Unknown error: HTTP response code " << response_code; | 135 error_stream << "Unknown error: HTTP response code " << response_code; |
| 136 } | 136 } |
| 137 } | 137 } |
| 138 | 138 |
| 139 LOG(WARNING) << "FEEDBACK: Submission to feedback server (" << | 139 LOG(WARNING) << "FEEDBACK: Submission to feedback server (" << |
| 140 source->GetUrl() << ") status: " << error_stream.str(); | 140 source->GetURL() << ") status: " << error_stream.str(); |
| 141 | 141 |
| 142 // Delete the URLFetcher. | 142 // Delete the URLFetcher. |
| 143 delete source; | 143 delete source; |
| 144 // And then delete ourselves. | 144 // And then delete ourselves. |
| 145 delete this; | 145 delete this; |
| 146 } | 146 } |
| 147 | 147 |
| 148 // static | 148 // static |
| 149 void BugReportUtil::SetOSVersion(std::string* os_version) { | 149 void BugReportUtil::SetOSVersion(std::string* os_version) { |
| 150 #if defined(OS_WIN) | 150 #if defined(OS_WIN) |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 if (screenshot_size == NULL) | 393 if (screenshot_size == NULL) |
| 394 screenshot_size = new gfx::Rect(); | 394 screenshot_size = new gfx::Rect(); |
| 395 return *screenshot_size; | 395 return *screenshot_size; |
| 396 } | 396 } |
| 397 | 397 |
| 398 // static | 398 // static |
| 399 void BugReportUtil::SetScreenshotSize(const gfx::Rect& rect) { | 399 void BugReportUtil::SetScreenshotSize(const gfx::Rect& rect) { |
| 400 gfx::Rect& screen_size = GetScreenshotSize(); | 400 gfx::Rect& screen_size = GetScreenshotSize(); |
| 401 screen_size = rect; | 401 screen_size = rect; |
| 402 } | 402 } |
| OLD | NEW |