| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef WEBKIT_BASE_ORIGIN_URL_CONVERSIONS_H_ | |
| 6 #define WEBKIT_BASE_ORIGIN_URL_CONVERSIONS_H_ | |
| 7 | |
| 8 #include "base/string16.h" | |
| 9 #include "webkit/base/webkit_base_export.h" | |
| 10 | |
| 11 class GURL; | |
| 12 | |
| 13 namespace webkit_base { | |
| 14 | |
| 15 // Returns the origin url for the given |identifier| and vice versa. | |
| 16 // The origin identifier string is a serialized form of a security origin | |
| 17 // and can be used as a path name as it contains no "/" or other possibly | |
| 18 // unsafe characters. (See WebKit's SecurityOrigin code for more details.) | |
| 19 // | |
| 20 // Example: | |
| 21 // "http://www.example.com:80/"'s identifier should look like: | |
| 22 // "http_www.example.host_80" | |
| 23 WEBKIT_BASE_EXPORT GURL GetOriginURLFromIdentifier( | |
| 24 const base::string16& identifier); | |
| 25 | |
| 26 WEBKIT_BASE_EXPORT base::string16 GetOriginIdentifierFromURL(const GURL& url); | |
| 27 | |
| 28 } // namespace webkit_base | |
| 29 | |
| 30 #endif // WEBKIT_BASE_ORIGIN_URL_CONVERSIONS_H_ | |
| OLD | NEW |