| 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 "storage/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 "webkit/browser/database/database_tracker.h" | 9 #include "storage/browser/database/database_tracker.h" |
| 10 #include "webkit/browser/database/vfs_backend.h" | 10 #include "storage/browser/database/vfs_backend.h" |
| 11 #include "webkit/common/database/database_identifier.h" | 11 #include "storage/common/database/database_identifier.h" |
| 12 | 12 |
| 13 namespace storage { | 13 namespace storage { |
| 14 | 14 |
| 15 namespace { | 15 namespace { |
| 16 | 16 |
| 17 bool IsSafeSuffix(const base::string16& suffix) { | 17 bool IsSafeSuffix(const base::string16& suffix) { |
| 18 base::char16 prev_c = 0; | 18 base::char16 prev_c = 0; |
| 19 for (base::string16::const_iterator it = suffix.begin(); | 19 for (base::string16::const_iterator it = suffix.begin(); |
| 20 it < suffix.end(); ++it) { | 20 it < suffix.end(); ++it) { |
| 21 base::char16 c = *it; | 21 base::char16 c = *it; |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 return base::FilePath(); | 99 return base::FilePath(); |
| 100 return full_path; | 100 return full_path; |
| 101 } | 101 } |
| 102 | 102 |
| 103 bool DatabaseUtil::IsValidOriginIdentifier( | 103 bool DatabaseUtil::IsValidOriginIdentifier( |
| 104 const std::string& origin_identifier) { | 104 const std::string& origin_identifier) { |
| 105 return GetOriginFromIdentifier(origin_identifier).is_valid(); | 105 return GetOriginFromIdentifier(origin_identifier).is_valid(); |
| 106 } | 106 } |
| 107 | 107 |
| 108 } // namespace storage | 108 } // namespace storage |
| OLD | NEW |