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

Issue 1774573002: crashpad win: Ensure database dir exists on first run (Closed)

Created:
4 years, 9 months ago by scottmg
Modified:
4 years, 9 months ago
Reviewers:
Nico, Will Harris
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

crashpad win: Ensure database dir exists on first run Crashpad will only create one level of directory for its database storage. On Windows, the target is %LOCALAPPDATA%\Google\Chrome\User Data\Crashpad. However, on first run when Crashpad is initialized, "User Data" will not yet have been created. We don't want to move Crashpad initialization later in startup, so we instead create the directory if it does not exist. Note that this is calling file_util::CreateDirectory(), rather than CreateDirectoryW() which means the full parent tree will be created, not just the last entry in the path. R=thakis@chromium.org,wfh@chromium.org TEST=remove local user data dir, install chrome, confirm that chrome --process-type=crashpad-handler exists on first run BUG=591504 Committed: https://crrev.com/92905ef36a30be9be9041d8ee07ccd6e7ca45d64 Cr-Commit-Position: refs/heads/master@{#379676}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -0 lines) Patch
M chrome/common/chrome_paths_win.cc View 2 chunks +5 lines, -0 lines 0 comments Download

Messages

Total messages: 22 (8 generated)
scottmg
4 years, 9 months ago (2016-03-07 18:02:56 UTC) #4
Nico
does this have test coverage through something?
4 years, 9 months ago (2016-03-07 18:08:49 UTC) #5
Will Harris
not familiar with the previous code but I'm surprised the crashpad dir doesn't move if ...
4 years, 9 months ago (2016-03-07 18:12:03 UTC) #6
scottmg
On 2016/03/07 18:08:49, Nico wrote: > does this have test coverage through something? I don't ...
4 years, 9 months ago (2016-03-07 18:16:50 UTC) #8
scottmg
On 2016/03/07 18:12:03, Will Harris wrote: > not familiar with the previous code but I'm ...
4 years, 9 months ago (2016-03-07 18:17:52 UTC) #9
Will Harris
lgtm
4 years, 9 months ago (2016-03-07 18:57:19 UTC) #11
Nico
lgtm assuming that function isn't called from the UI thread (if it were, the scopedioallowed ...
4 years, 9 months ago (2016-03-07 19:02:37 UTC) #12
scottmg
On 2016/03/07 19:02:37, Nico wrote: > lgtm assuming that function isn't called from the UI ...
4 years, 9 months ago (2016-03-07 22:33:28 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1774573002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1774573002/1
4 years, 9 months ago (2016-03-07 22:34:11 UTC) #15
Nico
Is there a way to not add disk i/o on the critical startup path?
4 years, 9 months ago (2016-03-07 22:34:26 UTC) #16
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 9 months ago (2016-03-07 23:00:53 UTC) #18
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/92905ef36a30be9be9041d8ee07ccd6e7ca45d64 Cr-Commit-Position: refs/heads/master@{#379676}
4 years, 9 months ago (2016-03-07 23:02:58 UTC) #20
Nico
On 2016/03/07 22:34:26, Nico wrote: > Is there a way to not add disk i/o ...
4 years, 9 months ago (2016-03-08 21:27:31 UTC) #21
scottmg
4 years, 9 months ago (2016-03-08 21:54:34 UTC) #22
Message was sent while issue was closed.
On 2016/03/07 22:34:26, Nico wrote:
> Is there a way to not add disk i/o on the critical startup path?

Sorry, I didn't see that comment.

Not obviously, as we need to create the profile and user data dirs to store
things in. Previously this happened to work because breakpad initialized later
than crashpad does, so the dir was already made by other profile creation code.
So theoretically there shouldn't be a noticeable startup regression, but famous
last words, we'll see what the perf bots say.

We could consider deferring Crashpad database creation until it's actually
necessary (which is why it in particular wants the dir to exist). It's needed
earlier than a crash occurring though, as it stores information such as the
client id, whether uploading is enabled, etc. So it would add some complexity to
have those API points need to block/auto-create the directory and database. I
filed https://bugs.chromium.org/p/crashpad/issues/detail?id=99 to investigate
that on the Crashpad side.

Powered by Google App Engine
This is Rietveld 408576698