WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
125028
[Curl] There is no way to specify cache folder.
https://bugs.webkit.org/show_bug.cgi?id=125028
Summary
[Curl] There is no way to specify cache folder.
peavo
Reported
2013-11-30 04:46:03 PST
For a WebKit client app, there is no way to specify where the cache folder should be.
Attachments
Patch
(1.28 KB, patch)
2013-11-30 04:50 PST
,
peavo
no flags
Details
Formatted Diff
Diff
Patch
(8.65 KB, patch)
2014-01-21 08:09 PST
,
peavo
no flags
Details
Formatted Diff
Diff
Patch
(8.63 KB, patch)
2014-01-21 13:35 PST
,
peavo
no flags
Details
Formatted Diff
Diff
Patch
(8.67 KB, patch)
2014-01-23 09:40 PST
,
peavo
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
peavo
Comment 1
2013-11-30 04:50:27 PST
Created
attachment 218091
[details]
Patch
Mátyás Mustoha
Comment 2
2013-12-02 02:08:42 PST
Hi, Instead of WebCore, the Cache Manager should be turned on in WebKit, as the cache folder parameter may vary between different platforms. For example, you can see how this is solved in Nix here:
https://github.com/WebKitNix/webkitnix/blob/master/Source/WebKit2/WebProcess/curl/WebProcessCurl.cpp
peavo
Comment 3
2014-01-21 08:09:22 PST
Created
attachment 221747
[details]
Patch
peavo
Comment 4
2014-01-21 08:13:53 PST
(In reply to
comment #2
)
> Hi, > > Instead of WebCore, the Cache Manager should be turned on in WebKit, as the cache folder parameter may vary between different platforms. > > For example, you can see how this is solved in Nix here: >
https://github.com/WebKitNix/webkitnix/blob/master/Source/WebKit2/WebProcess/curl/WebProcessCurl.cpp
Thanks for looking into this :) I updated the patch, added methods in the IWebCache interface to set and get cache folder location. I also enabled the disc cache in WinLauncher by setting it's cache folder.
Brent Fulgham
Comment 5
2014-01-21 11:17:12 PST
Comment on
attachment 221747
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=221747&action=review
> Tools/WinLauncher/WinLauncher.cpp:394 > +static bool getAppDataFolder(std::wstring& directory)
Why not take a _bstr_t intend? Then you don't have to do all the conversion to/from std::wsting?
> Tools/WinLauncher/WinLauncher.cpp:448 > + BSTR location = SysAllocString(appDataFolder.data());
If you use a _bstr_t you don't need to SysAlloc and SysFree manually. This is already used in WInLauncher.cpp, so it should build on all of our Windows targets.
peavo
Comment 6
2014-01-21 13:35:38 PST
Created
attachment 221782
[details]
Patch
peavo
Comment 7
2014-01-21 13:37:44 PST
(In reply to
comment #5
)
> (From update of
attachment 221747
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=221747&action=review
> > > Tools/WinLauncher/WinLauncher.cpp:394 > > +static bool getAppDataFolder(std::wstring& directory) > > Why not take a _bstr_t intend? Then you don't have to do all the conversion to/from std::wsting? >
Thanks, good point, updated patch :)
Brent Fulgham
Comment 8
2014-01-22 15:38:10 PST
Comment on
attachment 221782
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=221782&action=review
Minor nit-pick about prefixing with ::. Could you please fix that, and I'll r+ it?
> Tools/WinLauncher/WinLauncher.cpp:402 > + PathRemoveExtensionW(executablePath);
We prefix C API calls with ::, so these should be ::GetModuleFileNameW and ::PathRemoveExtensionW.
> Tools/WinLauncher/WinLauncher.cpp:404 > + directory = _bstr_t(appDataDirectory) + L"\\" + PathFindFileNameW(executablePath);
This should be ::PathFindFileNameW, too.
peavo
Comment 9
2014-01-23 08:24:26 PST
(In reply to
comment #8
)
> (From update of
attachment 221782
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=221782&action=review
> > Minor nit-pick about prefixing with ::. Could you please fix that, and I'll r+ it? > > > Tools/WinLauncher/WinLauncher.cpp:402 > > + PathRemoveExtensionW(executablePath); > > We prefix C API calls with ::, so these should be ::GetModuleFileNameW and ::PathRemoveExtensionW.
I would, but I'm getting style errors when I add the prefix: ERROR: Tools/WinLauncher/WinLauncher.cpp:402: Wrong number of spaces before statement. (expected: 8) [whitespace/indent] [4] Is there a bug in the style checker?
Brent Fulgham
Comment 10
2014-01-23 09:23:34 PST
(In reply to
comment #9
)
> (In reply to
comment #8
) > > (From update of
attachment 221782
[details]
[details]) > > View in context:
https://bugs.webkit.org/attachment.cgi?id=221782&action=review
> > > > Minor nit-pick about prefixing with ::. Could you please fix that, and I'll r+ it? > > > > > Tools/WinLauncher/WinLauncher.cpp:402 > > > + PathRemoveExtensionW(executablePath); > > > > We prefix C API calls with ::, so these should be ::GetModuleFileNameW and ::PathRemoveExtensionW. > > I would, but I'm getting style errors when I add the prefix: > > ERROR: Tools/WinLauncher/WinLauncher.cpp:402: Wrong number of spaces before statement. (expected: 8) [whitespace/indent] [4] > > Is there a bug in the style checker?
Yes, it looks like there is. I've filed a few bugs recently against it. Something changed that regressed a few things regarding whitespace. Go ahead and propose the patch with the incorrect style warning and I'll approve it.
peavo
Comment 11
2014-01-23 09:40:10 PST
Created
attachment 221990
[details]
Patch
peavo
Comment 12
2014-01-23 09:41:49 PST
(In reply to
comment #10
)
> Yes, it looks like there is. I've filed a few bugs recently against it. Something changed that regressed a few things regarding whitespace. > > Go ahead and propose the patch with the incorrect style warning and I'll approve it.
Thanks, updated patch :)
WebKit Commit Bot
Comment 13
2014-01-23 09:41:59 PST
Attachment 221990
[details]
did not pass style-queue: ERROR: Tools/WinLauncher/WinLauncher.cpp:401: Wrong number of spaces before statement. (expected: 8) [whitespace/indent] [4] ERROR: Tools/WinLauncher/WinLauncher.cpp:402: Wrong number of spaces before statement. (expected: 8) [whitespace/indent] [4] ERROR: Tools/WinLauncher/WinLauncher.cpp:404: Wrong number of spaces before statement. (expected: 8) [whitespace/indent] [4] ERROR: Tools/WinLauncher/WinLauncher.cpp:402: Wrong number of spaces before statement. (expected: 8) [whitespace/indent] [4] ERROR: Tools/WinLauncher/WinLauncher.cpp:404: Wrong number of spaces before statement. (expected: 8) [whitespace/indent] [4] Total errors found: 5 in 8 files If any of these errors are false positives, please file a bug against check-webkit-style.
Brent Fulgham
Comment 14
2014-01-23 09:42:38 PST
Comment on
attachment 221990
[details]
Patch r=me. Stupid stylebot!
peavo
Comment 15
2014-01-23 09:50:14 PST
(In reply to
comment #14
)
> (From update of
attachment 221990
[details]
) > r=me. Stupid stylebot!
:) Thanks!
WebKit Commit Bot
Comment 16
2014-01-23 10:16:12 PST
Comment on
attachment 221990
[details]
Patch Clearing flags on attachment: 221990 Committed
r162623
: <
http://trac.webkit.org/changeset/162623
>
WebKit Commit Bot
Comment 17
2014-01-23 10:16:15 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug