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

Issue 14027009: Crash when taking screenshot onto Chrome OS Google Drive (Closed)

Created:
7 years, 8 months ago by sschmitz
Modified:
7 years, 8 months ago
Reviewers:
James Cook, sky
CC:
chromium-reviews, sadrul, ben+watch_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Crash when taking screenshot onto Chrome OS Google Drive. And, Don't stack screenshot notifications. Changed profile handling. The profile is now retrieved everytime a screenshot is taken and not only once in Ash init. The reason is that the profile can change, which caused this crash. Changed behavior for a subsequent screenshot notification. It will replace the previous notification (rather than add a new one). When saving to Google Drive we have two path: screenshot path (used in notification) and local path (for internal cash/work; used in writing). Add proper handling of both paths. BUG=231707, 232876, 233574 R=jamescook@chromium.org TEST=manual Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=195370

Patch Set 1 #

Patch Set 2 : replace notification #

Total comments: 2

Patch Set 3 : constant notification id #

Patch Set 4 : fix for google drive #

Total comments: 6

Patch Set 5 : improved #

Total comments: 4

Patch Set 6 : minor #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+62 lines, -37 lines) Patch
M chrome/browser/ui/ash/ash_init.cc View 1 2 2 chunks +1 line, -4 lines 0 comments Download
M chrome/browser/ui/ash/screenshot_taker.h View 1 2 3 chunks +5 lines, -3 lines 0 comments Download
M chrome/browser/ui/ash/screenshot_taker.cc View 1 2 3 4 5 14 chunks +47 lines, -27 lines 1 comment Download
M chrome/browser/ui/ash/screenshot_taker_unittest.cc View 1 2 4 chunks +9 lines, -3 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
sschmitz
7 years, 8 months ago (2013-04-18 01:13:10 UTC) #1
sschmitz
Added fix for second bug.
7 years, 8 months ago (2013-04-18 17:13:14 UTC) #2
sschmitz
Changing reviewers since sky@ is OOO.
7 years, 8 months ago (2013-04-18 23:11:41 UTC) #3
James Cook
One question https://codereview.chromium.org/14027009/diff/5001/chrome/browser/ui/ash/screenshot_taker.cc File chrome/browser/ui/ash/screenshot_taker.cc (right): https://codereview.chromium.org/14027009/diff/5001/chrome/browser/ui/ash/screenshot_taker.cc#newcode330 chrome/browser/ui/ash/screenshot_taker.cc:330: g_browser_process->notification_ui_manager()->CancelById(notification_id_); Why not just always give screenshots ...
7 years, 8 months ago (2013-04-18 23:46:09 UTC) #4
sschmitz
Done https://codereview.chromium.org/14027009/diff/5001/chrome/browser/ui/ash/screenshot_taker.cc File chrome/browser/ui/ash/screenshot_taker.cc (right): https://codereview.chromium.org/14027009/diff/5001/chrome/browser/ui/ash/screenshot_taker.cc#newcode330 chrome/browser/ui/ash/screenshot_taker.cc:330: g_browser_process->notification_ui_manager()->CancelById(notification_id_); On 2013/04/18 23:46:09, James Cook (Chromium) wrote: ...
7 years, 8 months ago (2013-04-19 00:51:28 UTC) #5
sschmitz
Add fix for additional issue re Google Drive.
7 years, 8 months ago (2013-04-19 17:07:49 UTC) #6
James Cook
https://codereview.chromium.org/14027009/diff/30001/chrome/browser/ui/ash/screenshot_taker.cc File chrome/browser/ui/ash/screenshot_taker.cc (right): https://codereview.chromium.org/14027009/diff/30001/chrome/browser/ui/ash/screenshot_taker.cc#newcode141 chrome/browser/ui/ash/screenshot_taker.cc:141: // |local_path| is a temporary file in a hidden ...
7 years, 8 months ago (2013-04-19 17:25:34 UTC) #7
sschmitz
Done https://codereview.chromium.org/14027009/diff/30001/chrome/browser/ui/ash/screenshot_taker.cc File chrome/browser/ui/ash/screenshot_taker.cc (right): https://codereview.chromium.org/14027009/diff/30001/chrome/browser/ui/ash/screenshot_taker.cc#newcode141 chrome/browser/ui/ash/screenshot_taker.cc:141: // |local_path| is a temporary file in a ...
7 years, 8 months ago (2013-04-19 17:53:14 UTC) #8
James Cook
LGTM with nits https://codereview.chromium.org/14027009/diff/32002/chrome/browser/ui/ash/screenshot_taker.cc File chrome/browser/ui/ash/screenshot_taker.cc (right): https://codereview.chromium.org/14027009/diff/32002/chrome/browser/ui/ash/screenshot_taker.cc#newcode47 chrome/browser/ui/ash/screenshot_taker.cc:47: const char kScreenshot[] = "screenshot"; kScreenshotID? ...
7 years, 8 months ago (2013-04-19 17:59:11 UTC) #9
sschmitz
Thanks for your speedy review! https://codereview.chromium.org/14027009/diff/32002/chrome/browser/ui/ash/screenshot_taker.cc File chrome/browser/ui/ash/screenshot_taker.cc (right): https://codereview.chromium.org/14027009/diff/32002/chrome/browser/ui/ash/screenshot_taker.cc#newcode47 chrome/browser/ui/ash/screenshot_taker.cc:47: const char kScreenshot[] = ...
7 years, 8 months ago (2013-04-19 19:26:54 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sschmitz@chromium.org/14027009/29020
7 years, 8 months ago (2013-04-19 19:33:30 UTC) #11
commit-bot: I haz the power
Step "update" is always a major failure. Look at the try server FAQ for more ...
7 years, 8 months ago (2013-04-19 19:39:42 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sschmitz@chromium.org/14027009/29020
7 years, 8 months ago (2013-04-19 20:14:10 UTC) #13
commit-bot: I haz the power
Retried try job too often on mac_rel for step(s) base_unittests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=mac_rel&number=119858
7 years, 8 months ago (2013-04-19 21:04:47 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sschmitz@chromium.org/14027009/29020
7 years, 8 months ago (2013-04-19 21:27:56 UTC) #15
commit-bot: I haz the power
Change committed as 195370
7 years, 8 months ago (2013-04-20 02:24:32 UTC) #16
sky
7 years, 8 months ago (2013-04-22 15:01:19 UTC) #17
Message was sent while issue was closed.
https://codereview.chromium.org/14027009/diff/29020/chrome/browser/ui/ash/scr...
File chrome/browser/ui/ash/screenshot_taker.cc (right):

https://codereview.chromium.org/14027009/diff/29020/chrome/browser/ui/ash/scr...
chrome/browser/ui/ash/screenshot_taker.cc:384: return
ProfileManager::GetDefaultProfileOrOffTheRecord();
The reason I wanted this code to take a Profile is to avoid use of this
deprecated method. I think we should make this code (and other code in ash) take
a ProfileGetter, which is a pure virtual interface that had a single method to
get the Profile. The chromeos version would use this method, where as the
non-chromeos version would take a hard coded profile.

Powered by Google App Engine
This is Rietveld 408576698