Commit 430d2f47 authored by tyoshino's avatar tyoshino Committed by Commit bot

content::ResourceType clean up

- Remove unused using statements
- Remove unnecessary content::
- Include resource_type.h where IsResourceTypeFrame() is used
- Use IsResourceTypeFrame() where we can

R=reillyg@chromium.org,mmenke@chromium.org,mattm@chromium.org,treib@chromium.org
BUG=none

Review-Url: https://codereview.chromium.org/2576663004
Cr-Commit-Position: refs/heads/master@{#438792}
parent 2b891d60
...@@ -355,7 +355,7 @@ void LogMainFrameMetricsOnUIThread(const GURL& url, ...@@ -355,7 +355,7 @@ void LogMainFrameMetricsOnUIThread(const GURL& url,
void NotifyUIThreadOfRequestComplete( void NotifyUIThreadOfRequestComplete(
const content::ResourceRequestInfo::WebContentsGetter& web_contents_getter, const content::ResourceRequestInfo::WebContentsGetter& web_contents_getter,
const GURL& url, const GURL& url,
content::ResourceType resource_type, ResourceType resource_type,
bool was_cached, bool was_cached,
int net_error, int net_error,
int64_t total_received_bytes, int64_t total_received_bytes,
......
...@@ -138,7 +138,7 @@ class TestDispatcherHostDelegate : public ChromeResourceDispatcherHostDelegate { ...@@ -138,7 +138,7 @@ class TestDispatcherHostDelegate : public ChromeResourceDispatcherHostDelegate {
void AppendStandardResourceThrottles( void AppendStandardResourceThrottles(
net::URLRequest* request, net::URLRequest* request,
content::ResourceContext* resource_context, content::ResourceContext* resource_context,
content::ResourceType resource_type, ResourceType resource_type,
ScopedVector<content::ResourceThrottle>* throttles) override { ScopedVector<content::ResourceThrottle>* throttles) override {
++times_stardard_throttles_added_for_url_[request->url()]; ++times_stardard_throttles_added_for_url_[request->url()];
ChromeResourceDispatcherHostDelegate::AppendStandardResourceThrottles( ChromeResourceDispatcherHostDelegate::AppendStandardResourceThrottles(
......
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
#include "content/public/browser/resource_request_info.h" #include "content/public/browser/resource_request_info.h"
#include "content/public/common/content_switches.h" #include "content/public/common/content_switches.h"
#include "content/public/common/process_type.h" #include "content/public/common/process_type.h"
#include "content/public/common/resource_type.h"
#include "extensions/features/features.h" #include "extensions/features/features.h"
#include "net/base/host_port_pair.h" #include "net/base/host_port_pair.h"
#include "net/base/load_flags.h" #include "net/base/load_flags.h"
...@@ -79,7 +80,6 @@ ...@@ -79,7 +80,6 @@
using content::BrowserThread; using content::BrowserThread;
using content::RenderViewHost; using content::RenderViewHost;
using content::ResourceRequestInfo; using content::ResourceRequestInfo;
using content::ResourceType;
// By default we don't allow access to all file:// urls on ChromeOS and // By default we don't allow access to all file:// urls on ChromeOS and
// Android. // Android.
......
...@@ -23,8 +23,6 @@ ...@@ -23,8 +23,6 @@
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h" #include "url/gurl.h"
using content::ResourceType;
const int kNonInstantRendererPID = 0; const int kNonInstantRendererPID = 0;
const char kNonInstantOrigin[] = "http://evil"; const char kNonInstantOrigin[] = "http://evil";
const int kInstantRendererPID = 1; const int kInstantRendererPID = 1;
......
...@@ -19,8 +19,6 @@ ...@@ -19,8 +19,6 @@
#include "components/safe_browsing_db/v4_update_protocol_manager.h" #include "components/safe_browsing_db/v4_update_protocol_manager.h"
#include "url/gurl.h" #include "url/gurl.h"
using content::ResourceType;
namespace safe_browsing { namespace safe_browsing {
typedef unsigned ThreatSeverity; typedef unsigned ThreatSeverity;
......
...@@ -1221,10 +1221,7 @@ void ResourceDispatcherHostImpl::CompleteTransfer( ...@@ -1221,10 +1221,7 @@ void ResourceDispatcherHostImpl::CompleteTransfer(
DCHECK(request_data.transferred_request_child_id != -1 || DCHECK(request_data.transferred_request_child_id != -1 ||
request_data.transferred_request_request_id != -1); request_data.transferred_request_request_id != -1);
bool is_navigational_request = if (!IsResourceTypeFrame(request_data.resource_type)) {
request_data.resource_type == RESOURCE_TYPE_MAIN_FRAME ||
request_data.resource_type == RESOURCE_TYPE_SUB_FRAME;
if (!is_navigational_request) {
// Transfers apply only to navigational requests - the renderer seems to // Transfers apply only to navigational requests - the renderer seems to
// have sent bogus IPC data. // have sent bogus IPC data.
bad_message::ReceivedBadMessage( bad_message::ReceivedBadMessage(
......
...@@ -28,7 +28,6 @@ using base::FundamentalValue; ...@@ -28,7 +28,6 @@ using base::FundamentalValue;
using base::ListValue; using base::ListValue;
using base::StringValue; using base::StringValue;
using base::Value; using base::Value;
using content::ResourceType;
namespace extensions { namespace extensions {
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
#include "net/url_request/url_request_test_util.h" #include "net/url_request/url_request_test_util.h"
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
using content::ResourceType;
using url_matcher::URLMatcher; using url_matcher::URLMatcher;
using url_matcher::URLMatcherConditionSet; using url_matcher::URLMatcherConditionSet;
......
...@@ -66,7 +66,6 @@ ...@@ -66,7 +66,6 @@
using content::BrowserThread; using content::BrowserThread;
using content::ResourceRequestInfo; using content::ResourceRequestInfo;
using content::ResourceType;
using extensions::Extension; using extensions::Extension;
using extensions::SharedModuleInfo; using extensions::SharedModuleInfo;
......
...@@ -70,7 +70,6 @@ using base::UserMetricsAction; ...@@ -70,7 +70,6 @@ using base::UserMetricsAction;
using content::GlobalRequestID; using content::GlobalRequestID;
using content::RenderFrameHost; using content::RenderFrameHost;
using content::RenderProcessHost; using content::RenderProcessHost;
using content::ResourceType;
using content::StoragePartition; using content::StoragePartition;
using content::WebContents; using content::WebContents;
using guest_view::GuestViewBase; using guest_view::GuestViewBase;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment