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

Issue 10827193: Brushes up the code of screenshot filename. (Closed)

Created:
8 years, 4 months ago by Jun Mukai
Modified:
8 years, 4 months ago
Reviewers:
Daniel Erat, kinaba
CC:
chromium-reviews, sadrul, ben+watch_chromium.org
Visibility:
Public.

Description

Brushes up the code of screenshot filename. Currently it just checks the filename duplication and adding numbers (1),(2),... in case of duplication. But this doesn't work well if the file will be stored into GoogleDrive, since file operations are not atomic there. This CL does the followings: - the screenshot taker accepts "taking a screenshot for each root window" requests rather than taking a screenshot for the specified window - adding the number in case of multiple root-windows, in screenshot taker side - change the screenshot interval from 500msec -> 1sec, to avoid the duplication - remove the existing filename duplication checking code, which is no longer necessary BUG=140749 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=150758

Patch Set 1 #

Total comments: 2

Patch Set 2 : #

Patch Set 3 : #

Total comments: 2

Patch Set 4 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+83 lines, -89 lines) Patch
M ash/accelerators/accelerator_controller.cc View 1 2 3 1 chunk +1 line, -3 lines 0 comments Download
M ash/accelerators/accelerator_controller_unittest.cc View 1 2 3 1 chunk +2 lines, -3 lines 0 comments Download
M ash/accelerators/accelerator_filter_unittest.cc View 1 chunk +2 lines, -3 lines 0 comments Download
M ash/screenshot_delegate.h View 1 chunk +3 lines, -4 lines 0 comments Download
M chrome/browser/ui/ash/screenshot_taker.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/ash/screenshot_taker.cc View 1 2 8 chunks +74 lines, -75 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Jun Mukai
8 years, 4 months ago (2012-08-07 04:48:40 UTC) #1
kinaba
LGTM with a nit. http://codereview.chromium.org/10827193/diff/1/chrome/browser/ui/ash/screenshot_taker.cc File chrome/browser/ui/ash/screenshot_taker.cc (right): http://codereview.chromium.org/10827193/diff/1/chrome/browser/ui/ash/screenshot_taker.cc#newcode148 chrome/browser/ui/ash/screenshot_taker.cc:148: // "base_name.png" already exists. We ...
8 years, 4 months ago (2012-08-07 05:01:30 UTC) #2
Jun Mukai
http://codereview.chromium.org/10827193/diff/1/chrome/browser/ui/ash/screenshot_taker.cc File chrome/browser/ui/ash/screenshot_taker.cc (right): http://codereview.chromium.org/10827193/diff/1/chrome/browser/ui/ash/screenshot_taker.cc#newcode148 chrome/browser/ui/ash/screenshot_taker.cc:148: // "base_name.png" already exists. On 2012/08/07 05:01:30, kinaba wrote: ...
8 years, 4 months ago (2012-08-07 05:03:27 UTC) #3
Jun Mukai
derat, can you take a look at this as the OWNER of ash?
8 years, 4 months ago (2012-08-08 01:17:31 UTC) #4
Daniel Erat
lgtm http://codereview.chromium.org/10827193/diff/2003/ash/accelerators/accelerator_controller.cc File ash/accelerators/accelerator_controller.cc (right): http://codereview.chromium.org/10827193/diff/2003/ash/accelerators/accelerator_controller.cc#newcode443 ash/accelerators/accelerator_controller.cc:443: screenshot_delegate_->CanTakeScreenshot()) nit: add curly braces since if condition ...
8 years, 4 months ago (2012-08-08 16:33:08 UTC) #5
Jun Mukai
8 years, 4 months ago (2012-08-09 04:40:35 UTC) #6
http://codereview.chromium.org/10827193/diff/2003/ash/accelerators/accelerato...
File ash/accelerators/accelerator_controller.cc (right):

http://codereview.chromium.org/10827193/diff/2003/ash/accelerators/accelerato...
ash/accelerators/accelerator_controller.cc:443:
screenshot_delegate_->CanTakeScreenshot())
On 2012/08/08 16:33:08, Daniel Erat wrote:
> nit: add curly braces since if condition is two lines

Done.

Powered by Google App Engine
This is Rietveld 408576698