OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "webkit/database/database_util.h" | 5 #include "webkit/database/database_util.h" |
6 | 6 |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" | 8 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" |
9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" | 9 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" |
10 #include "webkit/database/database_tracker.h" | 10 #include "webkit/database/database_tracker.h" |
11 #include "webkit/database/vfs_backend.h" | 11 #include "webkit/database/vfs_backend.h" |
12 | 12 |
13 namespace webkit_database { | 13 namespace webkit_database { |
14 | 14 |
15 const char DatabaseUtil::kJournalFileSuffix[] = "-journal"; | 15 const char DatabaseUtil::kJournalFileSuffix[] = "-journal"; |
16 | 16 |
17 bool DatabaseUtil::CrackVfsFileName(const string16& vfs_file_name, | 17 bool DatabaseUtil::CrackVfsFileName(const string16& vfs_file_name, |
18 string16* origin_identifier, | 18 string16* origin_identifier, |
19 string16* database_name, | 19 string16* database_name, |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 origin_identifier).toString()); | 79 origin_identifier).toString()); |
80 // We need this work-around for file:/// URIs as | 80 // We need this work-around for file:/// URIs as |
81 // createFromDatabaseIdentifier returns empty origin url for them. | 81 // createFromDatabaseIdentifier returns empty origin url for them. |
82 if (origin.spec().empty() && | 82 if (origin.spec().empty() && |
83 origin_identifier.find(ASCIIToUTF16("file__")) == 0) | 83 origin_identifier.find(ASCIIToUTF16("file__")) == 0) |
84 return GURL("file:///"); | 84 return GURL("file:///"); |
85 return origin; | 85 return origin; |
86 } | 86 } |
87 | 87 |
88 } // namespace webkit_database | 88 } // namespace webkit_database |
OLD | NEW |