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

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

Issue 16879013: Use chromium logic for database identifier<->origin conversions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove webkit/base/origin_url_conversions Created 7 years, 6 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
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 #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
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
OLDNEW
« no previous file with comments | « webkit/browser/fileapi/obfuscated_file_util.cc ('k') | webkit/common/database/database_identifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698