OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/strings/string_piece.h" | 8 #include "base/strings/string_piece.h" |
9 #include "googleurl/src/gurl.h" | 9 #include "googleurl/src/gurl.h" |
10 #include "webkit/common/webkit_storage_common_export.h" | 10 #include "webkit/common/webkit_storage_common_export.h" |
11 | 11 |
12 namespace webkit_database { | 12 namespace webkit_database { |
13 | 13 |
| 14 WEBKIT_STORAGE_COMMON_EXPORT std::string GetIdentifierFromOrigin( |
| 15 const GURL& origin); |
| 16 WEBKIT_STORAGE_COMMON_EXPORT GURL GetOriginFromIdentifier( |
| 17 const std::string& identifier); |
| 18 |
14 class WEBKIT_STORAGE_COMMON_EXPORT DatabaseIdentifier { | 19 class WEBKIT_STORAGE_COMMON_EXPORT DatabaseIdentifier { |
15 public: | 20 public: |
16 static const DatabaseIdentifier UniqueFileIdentifier(); | 21 static const DatabaseIdentifier UniqueFileIdentifier(); |
17 static DatabaseIdentifier CreateFromOrigin(const GURL& origin); | 22 static DatabaseIdentifier CreateFromOrigin(const GURL& origin); |
18 static DatabaseIdentifier Parse(const std::string& identifier); | 23 static DatabaseIdentifier Parse(const std::string& identifier); |
19 ~DatabaseIdentifier(); | 24 ~DatabaseIdentifier(); |
20 | 25 |
21 std::string ToString() const; | 26 std::string ToString() const; |
22 GURL ToOrigin() const; | 27 GURL ToOrigin() const; |
23 | 28 |
(...skipping 11 matching lines...) Expand all Loading... |
35 bool is_file); | 40 bool is_file); |
36 | 41 |
37 std::string scheme_; | 42 std::string scheme_; |
38 std::string hostname_; | 43 std::string hostname_; |
39 int port_; | 44 int port_; |
40 bool is_unique_; | 45 bool is_unique_; |
41 bool is_file_; | 46 bool is_file_; |
42 }; | 47 }; |
43 | 48 |
44 } // namespace webkit_database | 49 } // namespace webkit_database |
OLD | NEW |