summaryrefslogtreecommitdiffstats
path: root/webkit/database/database_util.cc
diff options
context:
space:
mode:
authorjorlow@chromium.org <jorlow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-11 17:46:13 +0000
committerjorlow@chromium.org <jorlow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-11 17:46:13 +0000
commita3703dd92f9779ada9486a9781b05d071e836099 (patch)
treebb9673d0a5eb14cc5953f86808d17d45e78d805f /webkit/database/database_util.cc
parent18fe172980c11836c129b4cdc30e5530c77c10a0 (diff)
downloadchromium_src-a3703dd92f9779ada9486a9781b05d071e836099.zip
chromium_src-a3703dd92f9779ada9486a9781b05d071e836099.tar.gz
chromium_src-a3703dd92f9779ada9486a9781b05d071e836099.tar.bz2
Add support for CONTENT_SETTING_ASK to database.
TEST=none BUG=none Review URL: http://codereview.chromium.org/572001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38783 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/database/database_util.cc')
-rw-r--r--webkit/database/database_util.cc17
1 files changed, 11 insertions, 6 deletions
diff --git a/webkit/database/database_util.cc b/webkit/database/database_util.cc
index ae52a5a..4866b30 100644
--- a/webkit/database/database_util.cc
+++ b/webkit/database/database_util.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -28,11 +28,16 @@ bool DatabaseUtil::CrackVfsFileName(const string16& vfs_file_name,
return false;
}
- *origin_identifier = vfs_file_name.substr(0, first_slash_index);
- *database_name = vfs_file_name.substr(
- first_slash_index + 1, last_pound_index - first_slash_index - 1);
- *sqlite_suffix = vfs_file_name.substr(
- last_pound_index + 1, vfs_file_name.length() - last_pound_index - 1);
+ if (origin_identifier)
+ *origin_identifier = vfs_file_name.substr(0, first_slash_index);
+ if (database_name) {
+ *database_name = vfs_file_name.substr(
+ first_slash_index + 1, last_pound_index - first_slash_index - 1);
+ }
+ if (sqlite_suffix) {
+ *sqlite_suffix = vfs_file_name.substr(
+ last_pound_index + 1, vfs_file_name.length() - last_pound_index - 1);
+ }
return true;
}