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

Unified Diff: third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteFileSystemPosix.cpp

Issue 2634473002: [websql] Filenames are utf-8, not latin1. (Closed)
Patch Set: final changes? Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteFileSystemPosix.cpp
diff --git a/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteFileSystemPosix.cpp b/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteFileSystemPosix.cpp
index 77e7b6d904438cd7e2313f94737697bfbb951426..21bacd7f5e0ff032227ba7d952e974a22fbea703 100644
--- a/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteFileSystemPosix.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteFileSystemPosix.cpp
@@ -89,7 +89,7 @@ int chromiumTruncate(sqlite3_file* sqliteFile, sqlite3_int64 size) {
// The OSX and Linux sandboxes block ftruncate(), proxy to the browser
// process.
if (Platform::current()->databaseSetFileSize(
- String(chromiumFile->wrappedFileName), size))
+ String::fromUTF8(chromiumFile->wrappedFileName), size))
return SQLITE_OK;
return SQLITE_IOERR_TRUNCATE;
}
@@ -162,13 +162,14 @@ int chromiumOpenInternal(sqlite3_vfs* vfs,
sqlite3_file* id,
int desiredFlags,
int* usedFlags) {
- int fd =
- Platform::current()->databaseOpenFile(String(fileName), desiredFlags);
+ int fd = Platform::current()->databaseOpenFile(String::fromUTF8(fileName),
+ desiredFlags);
if ((fd < 0) && (desiredFlags & SQLITE_OPEN_READWRITE)) {
desiredFlags =
(desiredFlags & ~(SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE)) |
SQLITE_OPEN_READONLY;
- fd = Platform::current()->databaseOpenFile(String(fileName), desiredFlags);
+ fd = Platform::current()->databaseOpenFile(String::fromUTF8(fileName),
+ desiredFlags);
}
if (fd < 0)
return SQLITE_CANTOPEN;
@@ -247,7 +248,8 @@ int chromiumOpen(sqlite3_vfs* vfs,
// syncDir - determines if the directory to which this file belongs
// should be synched after the file is deleted.
int chromiumDelete(sqlite3_vfs*, const char* fileName, int syncDir) {
- return Platform::current()->databaseDeleteFile(String(fileName), syncDir);
+ return Platform::current()->databaseDeleteFile(String::fromUTF8(fileName),
+ syncDir);
}
// Check the existance and status of the given file.
@@ -257,8 +259,8 @@ int chromiumDelete(sqlite3_vfs*, const char* fileName, int syncDir) {
// flag - the type of test to make on this file.
// res - the result.
int chromiumAccess(sqlite3_vfs*, const char* fileName, int flag, int* res) {
- int attr = static_cast<int>(
- Platform::current()->databaseGetFileAttributes(String(fileName)));
+ int attr = static_cast<int>(Platform::current()->databaseGetFileAttributes(
+ String::fromUTF8(fileName)));
if (attr < 0) {
*res = 0;
return SQLITE_OK;

Powered by Google App Engine
This is Rietveld 408576698