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 10967030: Shorten the path length to get under MAX_PATH on windows. (Closed)

Created:
8 years, 3 months ago by awong
Modified:
8 years, 3 months ago
Reviewers:
Charlie Reis
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam
Visibility:
Public.

Description

Shorten the path length to get under MAX_PATH on windows. Some of the nested directories in each partition have variable length path names. Prepending our isolated storage path structure used to take us over the to MAX_PATH for chrome-extension:// origins when creating the database files for subsystems like Local Storage. With this change, on XP, assuming a 10-character user name, the Local Storage database file representing the chrome-extension: origin in the Default profile for user "abcdefghij" has this path: C:\Documents and Settings\abcedfghij\Local Settings\Application Data\ Google\Chrome SxS\User Data\Default\Storage\ ext\bdlahefabekefwlefaancobndodocndn\def\Local Storage\ chrome-extension_bdlahefabekefwlefaancobndodocndn_0.localstorage-journal which is 241 characters. This gives 19 characters of headroom from the 260 MAX_PATH. Previously, when we used "Storage Partitions", "extensions", and "default" instead of "Storage, "ext", and "def", the same database file would have a path length of 263 characters. This change doesn't completely solve the problem. If Local Storage is used on a super-long domain, we can still exceed MAX_PATH. However, using my own profile as an example, of 342 domains, none created paths longer than those of the chrome-extensions so this should be a pretty solid mitigation. BUG=151450 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=158136

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -5 lines) Patch
M content/browser/storage_partition_impl.cc View 1 chunk +5 lines, -5 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
awong
Charlie: this should be a pretty straightforward review. If it looks okay, could you please ...
8 years, 3 months ago (2012-09-21 01:07:07 UTC) #1
awong
Actually, I'm CQing so there's some chance for this to bake. Charlie, let me know ...
8 years, 3 months ago (2012-09-21 03:35:36 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ajwong@chromium.org/10967030/1
8 years, 3 months ago (2012-09-21 03:36:33 UTC) #3
Charlie Reis
The change LGTM, but the CL description is confusing. The example you give is missing ...
8 years, 3 months ago (2012-09-21 16:38:45 UTC) #4
awong
Ooops..you're right about the miscount to be 241 characters. Though where are you getting 263? ...
8 years, 3 months ago (2012-09-21 23:27:05 UTC) #5
Charlie Reis
263 is length of the path before this CL, when it was still "Storage Partitions", ...
8 years, 3 months ago (2012-09-21 23:40:11 UTC) #6
awong
Ah, I see what you're saying. I reworded the description. Let me know what you ...
8 years, 3 months ago (2012-09-21 23:50:14 UTC) #7
Charlie Reis
8 years, 3 months ago (2012-09-22 00:18:05 UTC) #8
On 2012/09/21 23:50:14, awong wrote:
> Ah, I see what you're saying.  I reworded the description. Let me know what
you
> think.
> 
> On 2012/09/21 23:40:11, creis wrote:
> > 263 is length of the path before this CL, when it was still "Storage
> > Partitions", "extensions", and "default":
> > C:\Documents and Settings\<username>\Local Settings\Application
> > Data\Google\Chrome SxS\User Data\Default\Storage
> > Partitions\extensions\bdlahefabekefwlefaancobndodocndn\default\Local
> >
>
Storage\chrome-extension_bdlahefabekefwlefaancobndodocndn_0.localstorage-journal
> > 
> > The way your description phrases it, it sounds like this CL fixes the
> > "dangerously close" problem, when really it goes from "already over the
limit"
> > down to "dangerously close to the limit".  Am I correct?
> > 
> > Charlie
> > 
> > 
> > On 2012/09/21 23:27:05, awong wrote:
> > > Ooops..you're right about the miscount to be 241 characters.
> > > 
> > > Though where are you getting 263?
> > > 
> > > -Albert
> > > 
> > > 
> > > On Fri, Sep 21, 2012 at 9:38 AM, <mailto:creis@chromium.org> wrote:
> > > 
> > > > The change LGTM, but the CL description is confusing.
> > > >
> > > > The example you give is missing "ext\", so it should actually be 241
> > > > characters.
> > > >  And it's not clear that this is the fixed state, after your CL.
> > > >  Currently,
> > > > that path would be 263 characters (over the limit):
> > > >
> > > >
> > > > C:\Documents and Settings\<username>\Local Settings\Application
> > > > Data\Google\Chrome SxS\User Data\Default\Storage
> > > > Partitions\extensions\**bdlahefabekefwlefaancobndodocn**dn\default\Local
> > > > Storage\chrome-extension_**bdlahefabekefwlefaancobndodocn**
> > > > dn_0.localstorage-journal
> > > >
> > > >
> > >
> >
>
https://codereview.chromium.**org/10967030/%25253Chttps://codereview.chromium...>
> > > >

Thanks, LGTM.

Powered by Google App Engine
This is Rietveld 408576698