Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6585)

Unified Diff: chrome/browser/ui/webui/bug_report_ui.cc

Issue 7635017: Fix saved screenshots for feedback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Mac fix 4 Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/bug_report_ui.cc
diff --git a/chrome/browser/ui/webui/bug_report_ui.cc b/chrome/browser/ui/webui/bug_report_ui.cc
index c5df51a8edf9e16286bf73f2acab3e202fee1a01..93c12bde37221c20672362479807ba3c40e1f66c 100644
--- a/chrome/browser/ui/webui/bug_report_ui.cc
+++ b/chrome/browser/ui/webui/bug_report_ui.cc
@@ -53,9 +53,7 @@ const char kScreenshotBaseUrl[] = "chrome://screenshots/";
const char kCurrentScreenshotUrl[] = "chrome://screenshots/current";
#if defined(OS_CHROMEOS)
const char kSavedScreenshotsUrl[] = "chrome://screenshots/saved/";
-
-const char kScreenshotPattern[] = "*.png";
-const char kScreenshotsRelativePath[] = "/Screenshots";
+const char kScreenshotPattern[] = "screenshot-*.png";
const size_t kMaxSavedScreenshots = 2;
#endif
@@ -73,11 +71,7 @@ void GetSavedScreenshots(std::vector<std::string>* saved_screenshots,
return;
}
- // TODO(rkc): Change this to use FilePath.Append() once the cros
- // issue with it is fixed
- FilePath screenshots_path(fileshelf_path.value() +
- std::string(kScreenshotsRelativePath));
- file_util::FileEnumerator screenshots(screenshots_path, false,
+ file_util::FileEnumerator screenshots(fileshelf_path, false,
file_util::FileEnumerator::FILES,
std::string(kScreenshotPattern));
FilePath screenshot = screenshots.Next();
@@ -513,9 +507,9 @@ void BugReportHandler::HandleSendReport(const ListValue* list_value) {
screenshot_path.erase(0, strlen(kScreenshotBaseUrl));
// Get the image to send in the report.
- std::vector<unsigned char> image;
+ ScreenshotDataPtr image_ptr;
if (!screenshot_path.empty())
- image = screenshot_source_->GetScreenshot(screenshot_path);
+ image_ptr = screenshot_source_->GetCachedScreenshot(screenshot_path);
#if defined(OS_CHROMEOS)
if (++i == list_value->end()) {
@@ -547,7 +541,7 @@ void BugReportHandler::HandleSendReport(const ListValue* list_value) {
, problem_type
, page_url
, description
- , image
+ , image_ptr
#if defined(OS_CHROMEOS)
, user_email
, send_sys_info
« no previous file with comments | « chrome/browser/ui/cocoa/bug_report_window_controller_unittest.mm ('k') | chrome/browser/ui/webui/screenshot_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698