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/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/Source/WebKit/chromium/public/WebSecurityOrigin.h" | 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" |
11 #include "webkit/browser/database/database_tracker.h" | 11 #include "webkit/browser/database/database_tracker.h" |
12 #include "webkit/browser/database/vfs_backend.h" | 12 #include "webkit/browser/database/vfs_backend.h" |
13 | 13 |
14 namespace webkit_database { | 14 namespace webkit_database { |
15 | 15 |
16 const char DatabaseUtil::kJournalFileSuffix[] = "-journal"; | 16 const char DatabaseUtil::kJournalFileSuffix[] = "-journal"; |
17 | 17 |
18 bool DatabaseUtil::CrackVfsFileName(const base::string16& vfs_file_name, | 18 bool DatabaseUtil::CrackVfsFileName(const base::string16& vfs_file_name, |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 char16 forbidden[] = {'\\', '/', '\0'}; | 76 char16 forbidden[] = {'\\', '/', '\0'}; |
77 | 77 |
78 base::string16::size_type pos = origin_identifier.find(dotdot); | 78 base::string16::size_type pos = origin_identifier.find(dotdot); |
79 if (pos == base::string16::npos) | 79 if (pos == base::string16::npos) |
80 pos = origin_identifier.find_first_of(forbidden, 0, arraysize(forbidden)); | 80 pos = origin_identifier.find_first_of(forbidden, 0, arraysize(forbidden)); |
81 | 81 |
82 return pos == base::string16::npos; | 82 return pos == base::string16::npos; |
83 } | 83 } |
84 | 84 |
85 } // namespace webkit_database | 85 } // namespace webkit_database |
OLD | NEW |