Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(168)

Side by Side Diff: webkit/browser/database/database_util.cc

Issue 492873002: Collapse fileapi, webkit_blob, webkit_database, quota, and webkit_common namespaces into single sto… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix chromeos build Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/browser/database/database_util.h ('k') | webkit/browser/database/databases_table.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "webkit/browser/database/database_tracker.h" 9 #include "webkit/browser/database/database_tracker.h"
10 #include "webkit/browser/database/vfs_backend.h" 10 #include "webkit/browser/database/vfs_backend.h"
11 #include "webkit/common/database/database_identifier.h" 11 #include "webkit/common/database/database_identifier.h"
12 12
13 namespace webkit_database { 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;
22 if (!(IsAsciiAlpha(c) || IsAsciiDigit(c) || 22 if (!(IsAsciiAlpha(c) || IsAsciiDigit(c) ||
23 c == '-' || c == '.' || c == '_')) { 23 c == '-' || c == '.' || c == '_')) {
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 base::FilePath::StringType::npos) 98 base::FilePath::StringType::npos)
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 webkit_database 108 } // namespace storage
OLDNEW
« no previous file with comments | « webkit/browser/database/database_util.h ('k') | webkit/browser/database/databases_table.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698