Index: chrome/browser/extensions/api/web_request/web_request_api_helpers.cc |
diff --git a/chrome/browser/extensions/api/web_request/web_request_api_helpers.cc b/chrome/browser/extensions/api/web_request/web_request_api_helpers.cc |
index 2cfbde51a4798814f8ae1ad0d335c069665f3971..26f1ef6052807f6e9ac60cf74edd9dccf06dc77a 100644 |
--- a/chrome/browser/extensions/api/web_request/web_request_api_helpers.cc |
+++ b/chrome/browser/extensions/api/web_request/web_request_api_helpers.cc |
@@ -32,7 +32,6 @@ |
// top of this file. |
using base::Time; |
-using content::ResourceType; |
using net::cookie_util::ParsedRequestCookie; |
using net::cookie_util::ParsedRequestCookies; |
@@ -42,39 +41,6 @@ namespace { |
typedef std::vector<linked_ptr<net::ParsedCookie> > ParsedResponseCookies; |
-static const char* kResourceTypeStrings[] = { |
- "main_frame", |
- "sub_frame", |
- "stylesheet", |
- "script", |
- "image", |
- "object", |
- "xmlhttprequest", |
- "other", |
- "other", |
-}; |
- |
-static ResourceType kResourceTypeValues[] = { |
- content::RESOURCE_TYPE_MAIN_FRAME, |
- content::RESOURCE_TYPE_SUB_FRAME, |
- content::RESOURCE_TYPE_STYLESHEET, |
- content::RESOURCE_TYPE_SCRIPT, |
- content::RESOURCE_TYPE_IMAGE, |
- content::RESOURCE_TYPE_OBJECT, |
- content::RESOURCE_TYPE_XHR, |
- content::RESOURCE_TYPE_LAST_TYPE, // represents "other" |
- // TODO(jochen): We duplicate the last entry, so the array's size is not a |
- // power of two. If it is, this triggers a bug in gcc 4.4 in Release builds |
- // (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43949). Once we use a version |
- // of gcc with this bug fixed, or the array is changed so this duplicate |
- // entry is no longer required, this should be removed. |
- content::RESOURCE_TYPE_LAST_TYPE, |
-}; |
- |
-COMPILE_ASSERT( |
- arraysize(kResourceTypeStrings) == arraysize(kResourceTypeValues), |
- keep_resource_types_in_sync); |
- |
void ClearCacheOnNavigationOnUI() { |
WebCacheManager::GetInstance()->ClearCacheOnNavigation(); |
} |
@@ -1180,34 +1146,6 @@ bool MergeOnAuthRequiredResponses( |
return credentials_set; |
} |
- |
-#define ARRAYEND(array) (array + arraysize(array)) |
- |
-bool IsRelevantResourceType(ResourceType type) { |
- ResourceType* iter = |
- std::find(kResourceTypeValues, ARRAYEND(kResourceTypeValues), type); |
- return iter != ARRAYEND(kResourceTypeValues); |
-} |
- |
-const char* ResourceTypeToString(ResourceType type) { |
- ResourceType* iter = |
- std::find(kResourceTypeValues, ARRAYEND(kResourceTypeValues), type); |
- if (iter == ARRAYEND(kResourceTypeValues)) |
- return "other"; |
- |
- return kResourceTypeStrings[iter - kResourceTypeValues]; |
-} |
- |
-bool ParseResourceType(const std::string& type_str, |
- ResourceType* type) { |
- const char** iter = |
- std::find(kResourceTypeStrings, ARRAYEND(kResourceTypeStrings), type_str); |
- if (iter == ARRAYEND(kResourceTypeStrings)) |
- return false; |
- *type = kResourceTypeValues[iter - kResourceTypeStrings]; |
- return true; |
-} |
- |
void ClearCacheOnNavigation() { |
if (content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)) { |
ClearCacheOnNavigationOnUI(); |