OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/feedback/feedback_util.h" | 5 #include "chrome/browser/feedback/feedback_util.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 version_info.Version() + | 276 version_info.Version() + |
277 " (" + version_info.LastChange() + ")"; | 277 " (" + version_info.LastChange() + ")"; |
278 AddFeedbackData(&feedback_data, std::string(kChromeVersionTag), | 278 AddFeedbackData(&feedback_data, std::string(kChromeVersionTag), |
279 chrome_version); | 279 chrome_version); |
280 } | 280 } |
281 | 281 |
282 // We don't need the OS version for ChromeOS since we get it in | 282 // We don't need the OS version for ChromeOS since we get it in |
283 // CHROMEOS_RELEASE_VERSION from /etc/lsb-release | 283 // CHROMEOS_RELEASE_VERSION from /etc/lsb-release |
284 #if !defined(OS_CHROMEOS) | 284 #if !defined(OS_CHROMEOS) |
285 // Add OS version (eg, for WinXP SP2: "5.1.2600 Service Pack 2"). | 285 // Add OS version (eg, for WinXP SP2: "5.1.2600 Service Pack 2"). |
286 std::string os_version = ""; | 286 std::string os_version; |
287 SetOSVersion(&os_version); | 287 SetOSVersion(&os_version); |
288 AddFeedbackData(&feedback_data, std::string(kOsVersionTag), os_version); | 288 AddFeedbackData(&feedback_data, std::string(kOsVersionTag), os_version); |
289 #endif | 289 #endif |
290 | 290 |
291 // Include the page image if we have one. | 291 // Include the page image if we have one. |
292 if (data->image().get() && data->image()->size()) { | 292 if (data->image().get() && data->image()->size()) { |
293 userfeedback::PostedScreenshot screenshot; | 293 userfeedback::PostedScreenshot screenshot; |
294 screenshot.set_mime_type(kPngMimeType); | 294 screenshot.set_mime_type(kPngMimeType); |
295 // Set the dimensions of the screenshot | 295 // Set the dimensions of the screenshot |
296 userfeedback::Dimensions dimensions; | 296 userfeedback::Dimensions dimensions; |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 if (screenshot_size == NULL) | 409 if (screenshot_size == NULL) |
410 screenshot_size = new gfx::Rect(); | 410 screenshot_size = new gfx::Rect(); |
411 return *screenshot_size; | 411 return *screenshot_size; |
412 } | 412 } |
413 | 413 |
414 // static | 414 // static |
415 void FeedbackUtil::SetScreenshotSize(const gfx::Rect& rect) { | 415 void FeedbackUtil::SetScreenshotSize(const gfx::Rect& rect) { |
416 gfx::Rect& screen_size = GetScreenshotSize(); | 416 gfx::Rect& screen_size = GetScreenshotSize(); |
417 screen_size = rect; | 417 screen_size = rect; |
418 } | 418 } |
OLD | NEW |