OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/browser/database/database_util.h" | 5 #include "webkit/browser/database/database_util.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "third_party/WebKit/public/platform/WebString.h" | 9 #include "third_party/WebKit/public/platform/WebString.h" |
10 #include "third_party/WebKit/public/web/WebSecurityOrigin.h" | |
11 #include "webkit/browser/database/database_tracker.h" | 10 #include "webkit/browser/database/database_tracker.h" |
12 #include "webkit/browser/database/vfs_backend.h" | 11 #include "webkit/browser/database/vfs_backend.h" |
13 | 12 |
14 namespace webkit_database { | 13 namespace webkit_database { |
15 | 14 |
16 const char DatabaseUtil::kJournalFileSuffix[] = "-journal"; | 15 const char DatabaseUtil::kJournalFileSuffix[] = "-journal"; |
17 | 16 |
18 bool DatabaseUtil::CrackVfsFileName(const base::string16& vfs_file_name, | 17 bool DatabaseUtil::CrackVfsFileName(const base::string16& vfs_file_name, |
19 std::string* origin_identifier, | 18 std::string* origin_identifier, |
20 base::string16* database_name, | 19 base::string16* database_name, |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 char forbidden[] = {'\\', '/', '\0'}; | 77 char forbidden[] = {'\\', '/', '\0'}; |
79 | 78 |
80 std::string::size_type pos = origin_identifier.find(dotdot); | 79 std::string::size_type pos = origin_identifier.find(dotdot); |
81 if (pos == std::string::npos) | 80 if (pos == std::string::npos) |
82 pos = origin_identifier.find_first_of(forbidden, 0, arraysize(forbidden)); | 81 pos = origin_identifier.find_first_of(forbidden, 0, arraysize(forbidden)); |
83 | 82 |
84 return pos == std::string::npos; | 83 return pos == std::string::npos; |
85 } | 84 } |
86 | 85 |
87 } // namespace webkit_database | 86 } // namespace webkit_database |
OLD | NEW |