| 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 #ifndef URL_THIRD_PARTY_MOZILLA_URL_PARSE_H_ | 5 #ifndef URL_THIRD_PARTY_MOZILLA_URL_PARSE_H_ |
| 6 #define URL_THIRD_PARTY_MOZILLA_URL_PARSE_H_ | 6 #define URL_THIRD_PARTY_MOZILLA_URL_PARSE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 // and its corresponding Parsed structure separately. | 68 // and its corresponding Parsed structure separately. |
| 69 // | 69 // |
| 70 // Typical usage would be: | 70 // Typical usage would be: |
| 71 // | 71 // |
| 72 // Parsed parsed; | 72 // Parsed parsed; |
| 73 // Component scheme; | 73 // Component scheme; |
| 74 // if (!ExtractScheme(url, url_len, &scheme)) | 74 // if (!ExtractScheme(url, url_len, &scheme)) |
| 75 // return I_CAN_NOT_FIND_THE_SCHEME_DUDE; | 75 // return I_CAN_NOT_FIND_THE_SCHEME_DUDE; |
| 76 // | 76 // |
| 77 // if (IsStandardScheme(url, scheme)) // Not provided by this component | 77 // if (IsStandardScheme(url, scheme)) // Not provided by this component |
| 78 // url_parseParseStandardURL(url, url_len, &parsed); | 78 // ParseStandardURL(url, url_len, &parsed); |
| 79 // else if (IsFileURL(url, scheme)) // Not provided by this component | 79 // else if (IsFileURL(url, scheme)) // Not provided by this component |
| 80 // ParseFileURL(url, url_len, &parsed); | 80 // ParseFileURL(url, url_len, &parsed); |
| 81 // else | 81 // else |
| 82 // ParsePathURL(url, url_len, &parsed); | 82 // ParsePathURL(url, url_len, &parsed); |
| 83 // | 83 // |
| 84 struct URL_EXPORT Parsed { | 84 struct URL_EXPORT Parsed { |
| 85 // Identifies different components. | 85 // Identifies different components. |
| 86 enum ComponentType { | 86 enum ComponentType { |
| 87 SCHEME, | 87 SCHEME, |
| 88 USERNAME, | 88 USERNAME, |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 Component* key, | 363 Component* key, |
| 364 Component* value); | 364 Component* value); |
| 365 URL_EXPORT bool ExtractQueryKeyValue(const base::char16* url, | 365 URL_EXPORT bool ExtractQueryKeyValue(const base::char16* url, |
| 366 Component* query, | 366 Component* query, |
| 367 Component* key, | 367 Component* key, |
| 368 Component* value); | 368 Component* value); |
| 369 | 369 |
| 370 } // namespace url | 370 } // namespace url |
| 371 | 371 |
| 372 #endif // URL_THIRD_PARTY_MOZILLA_URL_PARSE_H_ | 372 #endif // URL_THIRD_PARTY_MOZILLA_URL_PARSE_H_ |
| OLD | NEW |