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

Side by Side Diff: chrome/browser/ui/webui/feedback_ui.cc

Issue 10386219: Rename the screenshot file again, much more friendly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/ui/webui/feedback_ui.h" 5 #include "chrome/browser/ui/webui/feedback_ui.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 namespace { 61 namespace {
62 62
63 const char kScreenshotBaseUrl[] = "chrome://screenshots/"; 63 const char kScreenshotBaseUrl[] = "chrome://screenshots/";
64 const char kCurrentScreenshotUrl[] = "chrome://screenshots/current"; 64 const char kCurrentScreenshotUrl[] = "chrome://screenshots/current";
65 65
66 const char kCategoryTagParameter[] = "categoryTag="; 66 const char kCategoryTagParameter[] = "categoryTag=";
67 const char kDescriptionParameter[] = "description="; 67 const char kDescriptionParameter[] = "description=";
68 68
69 #if defined(OS_CHROMEOS) 69 #if defined(OS_CHROMEOS)
70 const char kSavedScreenshotsUrl[] = "chrome://screenshots/saved/"; 70 const char kSavedScreenshotsUrl[] = "chrome://screenshots/saved/";
71 const char kScreenshotPattern[] = "Screenshot_*.png"; 71 const char kScreenshotPattern[] = "Screenshot *.png";
72 72
73 const char kTimestampParameter[] = "timestamp="; 73 const char kTimestampParameter[] = "timestamp=";
74 74
75 const size_t kMaxSavedScreenshots = 2; 75 const size_t kMaxSavedScreenshots = 2;
76 #endif 76 #endif
77 77
78 #if defined(OS_CHROMEOS) 78 #if defined(OS_CHROMEOS)
79 79
80 // Compare two screenshot filepaths, which include the screenshot timestamp 80 // Compare two screenshot filepaths, which include the screenshot timestamp
81 // in the format of screenshot-yyyymmdd-hhmmss.png. Return true if |filepath1| 81 // in the format of screenshot-yyyymmdd-hhmmss.png. Return true if |filepath1|
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 size_t sort_size = std::min(max_saved, screenshot_filepaths.size()); 619 size_t sort_size = std::min(max_saved, screenshot_filepaths.size());
620 std::partial_sort(screenshot_filepaths.begin(), 620 std::partial_sort(screenshot_filepaths.begin(),
621 screenshot_filepaths.begin() + sort_size, 621 screenshot_filepaths.begin() + sort_size,
622 screenshot_filepaths.end(), 622 screenshot_filepaths.end(),
623 ScreenshotTimestampComp); 623 ScreenshotTimestampComp);
624 for (size_t i = 0; i < sort_size; ++i) 624 for (size_t i = 0; i < sort_size; ++i)
625 saved_screenshots->push_back(std::string(kSavedScreenshotsUrl) + 625 saved_screenshots->push_back(std::string(kSavedScreenshotsUrl) +
626 screenshot_filepaths[i]); 626 screenshot_filepaths[i]);
627 } 627 }
628 #endif 628 #endif
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/ash/screenshot_taker.cc ('k') | chrome/browser/ui/webui/feedback_ui_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698