[webkit-reviews] review granted: [Bug 38555] Small code refactoring: move the logic to figure out the path to the databases directory to another method : [Attachment 55071] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue May 4 16:50:14 PDT 2010
David Kilzer (ddkilzer) <ddkilzer at webkit.org> has granted Ada Chan
<adachan at apple.com>'s request for review:
Bug 38555: Small code refactoring: move the logic to figure out the path to the
databases directory to another method
https://bugs.webkit.org/show_bug.cgi?id=38555
Attachment 55071: Patch
https://bugs.webkit.org/attachment.cgi?id=55071&action=review
------- Additional Comments from David Kilzer (ddkilzer) <ddkilzer at webkit.org>
> Index: WebKit/mac/Storage/WebDatabaseManager.mm
> +static NSString *databasesDirectoryPath();
I don't think static is needed here. Also, this definition isn't needed unless
the method appears after the first use (IIRC).
> @@ -119,6 +121,16 @@ - (BOOL)deleteDatabase:(NSString *)datab
> +NSString *databasesDirectoryPath()
But "static" should definitely be added above.
> +{
> + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
> + NSString *databasesDirectory = [defaults
objectForKey:WebDatabaseDirectoryDefaultsKey];
> + if (!databasesDirectory || ![databasesDirectory isKindOfClass:[NSString
class]])
> + databasesDirectory = @"~/Library/WebKit/Databases";
> +
> + return [databasesDirectory stringByStandardizingPath];
> +}
r=me
Dave
More information about the webkit-reviews
mailing list