| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // Helper classes and functions used for the WebRequest API. | 5 // Helper classes and functions used for the WebRequest API. |
| 6 | 6 |
| 7 #ifndef EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_API_HELPERS_H_ | 7 #ifndef EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_API_HELPERS_H_ |
| 8 #define EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_API_HELPERS_H_ | 8 #define EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_API_HELPERS_H_ |
| 9 | 9 |
| 10 #include <list> | 10 #include <list> |
| (...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 const std::string& name, const std::string& value); | 342 const std::string& name, const std::string& value); |
| 343 | 343 |
| 344 // Returns whether |type| is a ResourceType that is handled by the web request | 344 // Returns whether |type| is a ResourceType that is handled by the web request |
| 345 // API. | 345 // API. |
| 346 bool IsRelevantResourceType(content::ResourceType type); | 346 bool IsRelevantResourceType(content::ResourceType type); |
| 347 | 347 |
| 348 // Returns a string representation of |type| or |other| if |type| is not handled | 348 // Returns a string representation of |type| or |other| if |type| is not handled |
| 349 // by the web request API. | 349 // by the web request API. |
| 350 const char* ResourceTypeToString(content::ResourceType type); | 350 const char* ResourceTypeToString(content::ResourceType type); |
| 351 | 351 |
| 352 // Stores a |content::ResourceType| representation in |type| if |type_str| is | 352 // Stores a |content::ResourceType| representation in |types| if |type_str| is |
| 353 // a resource type handled by the web request API. Returns true in case of | 353 // a resource type handled by the web request API. Returns true in case of |
| 354 // success. | 354 // success. |
| 355 bool ParseResourceType(const std::string& type_str, | 355 bool ParseResourceType(const std::string& type_str, |
| 356 content::ResourceType* type); | 356 std::vector<content::ResourceType>* types); |
| 357 | 357 |
| 358 } // namespace extension_web_request_api_helpers | 358 } // namespace extension_web_request_api_helpers |
| 359 | 359 |
| 360 #endif // EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_API_HELPERS_H_ | 360 #endif // EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_API_HELPERS_H_ |
| OLD | NEW |