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

Side by Side Diff: storage/common/database/database_identifier.h

Issue 1753403002: Move IsValidOriginIdentifier into appropriate header (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
OLDNEW
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 #ifndef STORAGE_COMMON_DATABASE_DATABASE_IDENTIFIER_H_ 5 #ifndef STORAGE_COMMON_DATABASE_DATABASE_IDENTIFIER_H_
6 #define STORAGE_COMMON_DATABASE_DATABASE_IDENTIFIER_H_ 6 #define STORAGE_COMMON_DATABASE_DATABASE_IDENTIFIER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/strings/string_piece.h" 10 #include "base/strings/string_piece.h"
11 #include "storage/common/storage_common_export.h" 11 #include "storage/common/storage_common_export.h"
12 #include "url/gurl.h" 12 #include "url/gurl.h"
13 13
14 namespace storage { 14 namespace storage {
15 15
16 STORAGE_COMMON_EXPORT std::string GetIdentifierFromOrigin( 16 STORAGE_COMMON_EXPORT std::string GetIdentifierFromOrigin(
17 const GURL& origin); 17 const GURL& origin);
18 STORAGE_COMMON_EXPORT GURL GetOriginFromIdentifier( 18 STORAGE_COMMON_EXPORT GURL GetOriginFromIdentifier(
19 const std::string& identifier); 19 const std::string& identifier);
20 STORAGE_COMMON_EXPORT bool IsValidOriginIdentifier(
21 const std::string& identifier);
20 22
21 class STORAGE_COMMON_EXPORT DatabaseIdentifier { 23 class STORAGE_COMMON_EXPORT DatabaseIdentifier {
22 public: 24 public:
23 static const DatabaseIdentifier UniqueFileIdentifier(); 25 static const DatabaseIdentifier UniqueFileIdentifier();
24 static DatabaseIdentifier CreateFromOrigin(const GURL& origin); 26 static DatabaseIdentifier CreateFromOrigin(const GURL& origin);
25 static DatabaseIdentifier Parse(const std::string& identifier); 27 static DatabaseIdentifier Parse(const std::string& identifier);
26 ~DatabaseIdentifier(); 28 ~DatabaseIdentifier();
27 29
28 std::string ToString() const; 30 std::string ToString() const;
29 GURL ToOrigin() const; 31 GURL ToOrigin() const;
(...skipping 14 matching lines...) Expand all
44 std::string scheme_; 46 std::string scheme_;
45 std::string hostname_; 47 std::string hostname_;
46 int port_; 48 int port_;
47 bool is_unique_; 49 bool is_unique_;
48 bool is_file_; 50 bool is_file_;
49 }; 51 };
50 52
51 } // namespace storage 53 } // namespace storage
52 54
53 #endif // STORAGE_COMMON_DATABASE_DATABASE_IDENTIFIER_H_ 55 #endif // STORAGE_COMMON_DATABASE_DATABASE_IDENTIFIER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698