diff options
92 files changed, 145 insertions, 95 deletions
diff --git a/android_webview/browser/aw_content_browser_client.cc b/android_webview/browser/aw_content_browser_client.cc index 9181ce5..2e3f9fb 100644 --- a/android_webview/browser/aw_content_browser_client.cc +++ b/android_webview/browser/aw_content_browser_client.cc @@ -37,6 +37,7 @@ #include "webkit/common/webpreferences.h" using content::BrowserThread; +using content::ResourceType; namespace android_webview { namespace { diff --git a/android_webview/browser/aw_content_browser_client.h b/android_webview/browser/aw_content_browser_client.h index 355f743..7d4f3f5 100644 --- a/android_webview/browser/aw_content_browser_client.h +++ b/android_webview/browser/aw_content_browser_client.h @@ -98,7 +98,7 @@ class AwContentBrowserClient : public content::ContentBrowserClient { int cert_error, const net::SSLInfo& ssl_info, const GURL& request_url, - ResourceType::Type resource_type, + content::ResourceType::Type resource_type, bool overridable, bool strict_enforcement, const base::Callback<void(bool)>& callback, diff --git a/android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc b/android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc index 979f30a6..d46b45f 100644 --- a/android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc +++ b/android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc @@ -28,6 +28,7 @@ using android_webview::AwContentsIoThreadClient; using content::BrowserThread; +using content::ResourceType; using navigation_interception::InterceptNavigationDelegate; namespace { diff --git a/android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.h b/android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.h index e8f9c73..55e61c8 100644 --- a/android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.h +++ b/android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.h @@ -33,7 +33,7 @@ class AwResourceDispatcherHostDelegate net::URLRequest* request, content::ResourceContext* resource_context, content::AppCacheService* appcache_service, - ResourceType::Type resource_type, + content::ResourceType::Type resource_type, int child_id, int route_id, ScopedVector<content::ResourceThrottle>* throttles) OVERRIDE; diff --git a/android_webview/native/aw_contents_io_thread_client_impl.cc b/android_webview/native/aw_contents_io_thread_client_impl.cc index a6912a8..12ffb15 100644 --- a/android_webview/native/aw_contents_io_thread_client_impl.cc +++ b/android_webview/native/aw_contents_io_thread_client_impl.cc @@ -36,6 +36,7 @@ using base::android::ToJavaArrayOfStrings; using base::LazyInstance; using content::BrowserThread; using content::RenderFrameHost; +using content::ResourceType; using content::WebContents; using std::map; using std::pair; diff --git a/chrome/browser/captive_portal/captive_portal_tab_helper.cc b/chrome/browser/captive_portal/captive_portal_tab_helper.cc index 4b2b6e1..b3f0f88 100644 --- a/chrome/browser/captive_portal/captive_portal_tab_helper.cc +++ b/chrome/browser/captive_portal/captive_portal_tab_helper.cc @@ -27,6 +27,7 @@ #include "net/ssl/ssl_info.h" using captive_portal::CaptivePortalResult; +using content::ResourceType; DEFINE_WEB_CONTENTS_USER_DATA_KEY(CaptivePortalTabHelper); diff --git a/chrome/browser/captive_portal/captive_portal_tab_helper.h b/chrome/browser/captive_portal/captive_portal_tab_helper.h index 04175c3..52d5c36 100644 --- a/chrome/browser/captive_portal/captive_portal_tab_helper.h +++ b/chrome/browser/captive_portal/captive_portal_tab_helper.h @@ -14,7 +14,7 @@ #include "content/public/browser/notification_registrar.h" #include "content/public/browser/web_contents_observer.h" #include "content/public/browser/web_contents_user_data.h" -#include "webkit/common/resource_type.h" +#include "content/public/common/resource_type.h" class GURL; class Profile; @@ -108,7 +108,7 @@ class CaptivePortalTabHelper // Called by Observe in response to the corresponding event. void OnRedirect(int child_id, - ResourceType::Type resource_type, + content::ResourceType::Type resource_type, const GURL& new_url); // Called by Observe in response to the corresponding event. diff --git a/chrome/browser/captive_portal/captive_portal_tab_helper_unittest.cc b/chrome/browser/captive_portal/captive_portal_tab_helper_unittest.cc index c7cb495..f8ff597 100644 --- a/chrome/browser/captive_portal/captive_portal_tab_helper_unittest.cc +++ b/chrome/browser/captive_portal/captive_portal_tab_helper_unittest.cc @@ -22,6 +22,7 @@ #include "testing/gtest/include/gtest/gtest.h" using captive_portal::CaptivePortalResult; +using content::ResourceType; namespace { diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc index ff8dd62..618b922 100644 --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc @@ -261,6 +261,7 @@ using content::ChildProcessSecurityPolicy; using content::QuotaPermissionContext; using content::RenderFrameHost; using content::RenderViewHost; +using content::ResourceType; using content::SiteInstance; using content::WebContents; using extensions::APIPermission; diff --git a/chrome/browser/chrome_content_browser_client.h b/chrome/browser/chrome_content_browser_client.h index c53e0f5..e42664b 100644 --- a/chrome/browser/chrome_content_browser_client.h +++ b/chrome/browser/chrome_content_browser_client.h @@ -167,7 +167,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { int cert_error, const net::SSLInfo& ssl_info, const GURL& request_url, - ResourceType::Type resource_type, + content::ResourceType::Type resource_type, bool overridable, bool strict_enforcement, const base::Callback<void(bool)>& callback, diff --git a/chrome/browser/chromeos/login/signin/merge_session_throttle.cc b/chrome/browser/chromeos/login/signin/merge_session_throttle.cc index e92ff99..259e84b 100644 --- a/chrome/browser/chromeos/login/signin/merge_session_throttle.cc +++ b/chrome/browser/chromeos/login/signin/merge_session_throttle.cc @@ -34,6 +34,7 @@ using content::BrowserThread; using content::RenderViewHost; +using content::ResourceType; using content::WebContents; namespace { diff --git a/chrome/browser/chromeos/login/signin/merge_session_throttle.h b/chrome/browser/chromeos/login/signin/merge_session_throttle.h index 8bfbeb7..a208e43 100644 --- a/chrome/browser/chromeos/login/signin/merge_session_throttle.h +++ b/chrome/browser/chromeos/login/signin/merge_session_throttle.h @@ -11,8 +11,8 @@ #include "base/memory/ref_counted.h" #include "base/memory/weak_ptr.h" #include "content/public/browser/resource_throttle.h" +#include "content/public/common/resource_type.h" #include "net/base/completion_callback.h" -#include "webkit/common/resource_type.h" class Profile; @@ -36,7 +36,7 @@ class MergeSessionThrottle typedef base::Closure CompletionCallback; explicit MergeSessionThrottle(net::URLRequest* request, - ResourceType::Type resource_type); + content::ResourceType::Type resource_type); virtual ~MergeSessionThrottle(); // content::ResourceThrottle implementation: @@ -74,14 +74,14 @@ class MergeSessionThrottle // (for ResourceType::MAIN_FRAME). // The function must be called from UI thread. static void DeleayResourceLoadingOnUIThread( - ResourceType::Type resource_type, + content::ResourceType::Type resource_type, int render_process_id, int render_view_id, const GURL& url, const MergeSessionThrottle::CompletionCallback& callback); net::URLRequest* request_; - ResourceType::Type resource_type_; + content::ResourceType::Type resource_type_; // Global counter that keeps the track of session merge status for all // encountered profiles. This is used to determine if a throttle should diff --git a/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.cc b/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.cc index 53b902a..a0218d3 100644 --- a/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.cc +++ b/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.cc @@ -30,6 +30,7 @@ using base::DictionaryValue; using base::ListValue; using base::StringValue; using base::Value; +using content::ResourceType; namespace helpers = extension_web_request_api_helpers; namespace keys = extensions::declarative_webrequest_constants; diff --git a/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.h b/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.h index f4c8f75..d8e8028 100644 --- a/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.h +++ b/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.h @@ -13,7 +13,7 @@ #include "base/memory/scoped_ptr.h" #include "chrome/browser/extensions/api/declarative_webrequest/request_stage.h" #include "chrome/common/extensions/api/events.h" -#include "webkit/common/resource_type.h" +#include "content/public/common/resource_type.h" namespace base { class Value; @@ -105,10 +105,10 @@ class WebRequestConditionAttributeResourceType private: explicit WebRequestConditionAttributeResourceType( - const std::vector<ResourceType::Type>& types); + const std::vector<content::ResourceType::Type>& types); virtual ~WebRequestConditionAttributeResourceType(); - const std::vector<ResourceType::Type> types_; + const std::vector<content::ResourceType::Type> types_; DISALLOW_COPY_AND_ASSIGN(WebRequestConditionAttributeResourceType); }; diff --git a/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute_unittest.cc b/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute_unittest.cc index 049afb35..db269a1 100644 --- a/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute_unittest.cc +++ b/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute_unittest.cc @@ -21,6 +21,7 @@ using base::FundamentalValue; using base::ListValue; using base::StringValue; using base::Value; +using content::ResourceType; namespace extensions { diff --git a/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_unittest.cc b/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_unittest.cc index 63c9e1b..dab3389 100644 --- a/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_unittest.cc +++ b/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_unittest.cc @@ -16,6 +16,7 @@ #include "net/url_request/url_request_test_util.h" #include "testing/gtest/include/gtest/gtest.h" +using content::ResourceType; using url_matcher::URLMatcher; using url_matcher::URLMatcherConditionSet; diff --git a/chrome/browser/extensions/api/web_navigation/web_navigation_api.cc b/chrome/browser/extensions/api/web_navigation/web_navigation_api.cc index 943c8e8..0ac6ef8 100644 --- a/chrome/browser/extensions/api/web_navigation/web_navigation_api.cc +++ b/chrome/browser/extensions/api/web_navigation/web_navigation_api.cc @@ -30,6 +30,8 @@ #include "extensions/browser/view_type_utils.h" #include "net/base/net_errors.h" +using content::ResourceType; + namespace GetFrame = extensions::api::web_navigation::GetFrame; namespace GetAllFrames = extensions::api::web_navigation::GetAllFrames; diff --git a/chrome/browser/extensions/api/web_navigation/web_navigation_apitest.cc b/chrome/browser/extensions/api/web_navigation/web_navigation_apitest.cc index e4c3e07..ffbad82 100644 --- a/chrome/browser/extensions/api/web_navigation/web_navigation_apitest.cc +++ b/chrome/browser/extensions/api/web_navigation/web_navigation_apitest.cc @@ -37,6 +37,7 @@ #include "content/public/browser/resource_throttle.h" #include "content/public/browser/web_contents.h" #include "content/public/common/context_menu_params.h" +#include "content/public/common/resource_type.h" #include "content/public/common/url_constants.h" #include "content/public/test/browser_test_utils.h" #include "extensions/browser/extension_system.h" @@ -45,8 +46,8 @@ #include "net/test/embedded_test_server/embedded_test_server.h" #include "third_party/WebKit/public/web/WebContextMenuData.h" #include "third_party/WebKit/public/web/WebInputEvent.h" -#include "webkit/common/resource_type.h" +using content::ResourceType; using content::WebContents; namespace extensions { diff --git a/chrome/browser/extensions/api/web_request/web_request_api.cc b/chrome/browser/extensions/api/web_request/web_request_api.cc index 6643716..915a140 100644 --- a/chrome/browser/extensions/api/web_request/web_request_api.cc +++ b/chrome/browser/extensions/api/web_request/web_request_api.cc @@ -75,6 +75,7 @@ using base::StringValue; using content::BrowserMessageFilter; using content::BrowserThread; using content::ResourceRequestInfo; +using content::ResourceType; using extensions::ErrorUtils; using extensions::Extension; using extensions::ExtensionWarning; diff --git a/chrome/browser/extensions/api/web_request/web_request_api.h b/chrome/browser/extensions/api/web_request/web_request_api.h index de0a6fc..2851b5b 100644 --- a/chrome/browser/extensions/api/web_request/web_request_api.h +++ b/chrome/browser/extensions/api/web_request/web_request_api.h @@ -18,6 +18,7 @@ #include "chrome/browser/extensions/api/declarative_webrequest/request_stage.h" #include "chrome/browser/extensions/api/web_request/web_request_api_helpers.h" #include "chrome/browser/extensions/api/web_request/web_request_permissions.h" +#include "content/public/common/resource_type.h" #include "extensions/browser/browser_context_keyed_api_factory.h" #include "extensions/browser/event_router.h" #include "extensions/browser/extension_function.h" @@ -26,7 +27,6 @@ #include "net/base/completion_callback.h" #include "net/base/network_delegate.h" #include "net/http/http_request_headers.h" -#include "webkit/common/resource_type.h" class ExtensionWebRequestTimeTracker; class GURL; @@ -119,7 +119,7 @@ class ExtensionWebRequestEventRouter bool InitFromValue(const base::DictionaryValue& value, std::string* error); extensions::URLPatternSet urls; - std::vector<ResourceType::Type> types; + std::vector<content::ResourceType::Type> types; int tab_id; int window_id; }; @@ -357,7 +357,7 @@ class ExtensionWebRequestEventRouter int window_id, int render_process_host_id, int routing_id, - ResourceType::Type resource_type, + content::ResourceType::Type resource_type, bool is_async_request, bool is_request_from_extension, int* extra_info_spec, 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 5e24399..ed89368 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,6 +32,7 @@ // top of this file. using base::Time; +using content::ResourceType; using extensions::ExtensionWarning; namespace extension_web_request_api_helpers { diff --git a/chrome/browser/extensions/api/web_request/web_request_api_helpers.h b/chrome/browser/extensions/api/web_request/web_request_api_helpers.h index 5901d22..069ba85 100644 --- a/chrome/browser/extensions/api/web_request/web_request_api_helpers.h +++ b/chrome/browser/extensions/api/web_request/web_request_api_helpers.h @@ -16,11 +16,11 @@ #include "base/memory/scoped_ptr.h" #include "base/time/time.h" #include "chrome/browser/extensions/extension_warning_set.h" +#include "content/public/common/resource_type.h" #include "net/base/auth.h" #include "net/http/http_request_headers.h" #include "net/http/http_response_headers.h" #include "url/gurl.h" -#include "webkit/common/resource_type.h" namespace base { class ListValue; @@ -304,17 +304,17 @@ bool MergeOnAuthRequiredResponses( // Returns whether |type| is a ResourceType that is handled by the web request // API. -bool IsRelevantResourceType(ResourceType::Type type); +bool IsRelevantResourceType(content::ResourceType::Type type); // Returns a string representation of |type| or |other| if |type| is not handled // by the web request API. -const char* ResourceTypeToString(ResourceType::Type type); +const char* ResourceTypeToString(content::ResourceType::Type type); // Stores a |ResourceType::Type| representation in |type| if |type_str| is // a resource type handled by the web request API. Returns true in case of // success. bool ParseResourceType(const std::string& type_str, - ResourceType::Type* type); + content::ResourceType::Type* type); // Triggers clearing each renderer's in-memory cache the next time it navigates. void ClearCacheOnNavigation(); diff --git a/chrome/browser/extensions/api/web_request/web_request_permissions_unittest.cc b/chrome/browser/extensions/api/web_request/web_request_permissions_unittest.cc index 9d7de4c..b6f11d0 100644 --- a/chrome/browser/extensions/api/web_request/web_request_permissions_unittest.cc +++ b/chrome/browser/extensions/api/web_request/web_request_permissions_unittest.cc @@ -17,6 +17,7 @@ #include "testing/gtest/include/gtest/gtest.h" using content::ResourceRequestInfo; +using content::ResourceType; using extensions::Extension; using extensions::Manifest; using extension_test_util::LoadManifestUnchecked; diff --git a/chrome/browser/extensions/url_request_util.cc b/chrome/browser/extensions/url_request_util.cc index a082c4b..e75cf5c 100644 --- a/chrome/browser/extensions/url_request_util.cc +++ b/chrome/browser/extensions/url_request_util.cc @@ -36,6 +36,7 @@ #include "ui/base/resource/resource_bundle.h" using content::BrowserThread; +using content::ResourceType; using extensions::ExtensionsBrowserClient; namespace { diff --git a/chrome/browser/extensions/user_script_listener.cc b/chrome/browser/extensions/user_script_listener.cc index 4b3be2a..fcebfa5 100644 --- a/chrome/browser/extensions/user_script_listener.cc +++ b/chrome/browser/extensions/user_script_listener.cc @@ -19,6 +19,7 @@ using content::BrowserThread; using content::ResourceThrottle; +using content::ResourceType; namespace extensions { diff --git a/chrome/browser/extensions/user_script_listener.h b/chrome/browser/extensions/user_script_listener.h index 009a9d74..7063121 100644 --- a/chrome/browser/extensions/user_script_listener.h +++ b/chrome/browser/extensions/user_script_listener.h @@ -15,7 +15,7 @@ #include "content/public/browser/browser_thread.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" -#include "webkit/common/resource_type.h" +#include "content/public/common/resource_type.h" class GURL; class URLPattern; @@ -46,7 +46,7 @@ class UserScriptListener // given URL. Otherwise, this method returns NULL. content::ResourceThrottle* CreateResourceThrottle( const GURL& url, - ResourceType::Type resource_type); + content::ResourceType::Type resource_type); private: friend struct content::BrowserThread::DeleteOnThread< @@ -57,7 +57,8 @@ class UserScriptListener virtual ~UserScriptListener(); - bool ShouldDelayRequest(const GURL& url, ResourceType::Type resource_type); + bool ShouldDelayRequest(const GURL& url, + content::ResourceType::Type resource_type); void StartDelayedRequests(); // Update user_scripts_ready_ based on the status of all profiles. On a diff --git a/chrome/browser/extensions/user_script_listener_unittest.cc b/chrome/browser/extensions/user_script_listener_unittest.cc index 7cb30ca..b49d740 100644 --- a/chrome/browser/extensions/user_script_listener_unittest.cc +++ b/chrome/browser/extensions/user_script_listener_unittest.cc @@ -27,6 +27,7 @@ using content::ResourceController; using content::ResourceThrottle; +using content::ResourceType; namespace extensions { diff --git a/chrome/browser/guest_view/web_view/web_view_guest.cc b/chrome/browser/guest_view/web_view/web_view_guest.cc index 43325fd..77e3676 100644 --- a/chrome/browser/guest_view/web_view/web_view_guest.cc +++ b/chrome/browser/guest_view/web_view/web_view_guest.cc @@ -75,6 +75,7 @@ using base::UserMetricsAction; using content::RenderFrameHost; +using content::ResourceType; using content::WebContents; namespace { diff --git a/chrome/browser/net/chrome_network_delegate.cc b/chrome/browser/net/chrome_network_delegate.cc index 6558ae1..6ef9374 100644 --- a/chrome/browser/net/chrome_network_delegate.cc +++ b/chrome/browser/net/chrome_network_delegate.cc @@ -75,6 +75,7 @@ using content::BrowserThread; using content::RenderViewHost; using content::ResourceRequestInfo; +using content::ResourceType; // By default we don't allow access to all file:// urls on ChromeOS and // Android. diff --git a/chrome/browser/prerender/prerender_contents.cc b/chrome/browser/prerender/prerender_contents.cc index 14d0001..672ec3c 100644 --- a/chrome/browser/prerender/prerender_contents.cc +++ b/chrome/browser/prerender/prerender_contents.cc @@ -47,6 +47,7 @@ using content::DownloadItem; using content::OpenURLParams; using content::RenderViewHost; using content::ResourceRedirectDetails; +using content::ResourceType; using content::SessionStorageNamespace; using content::WebContents; diff --git a/chrome/browser/prerender/prerender_pending_swap_throttle.cc b/chrome/browser/prerender/prerender_pending_swap_throttle.cc index a560bae..5c519e3 100644 --- a/chrome/browser/prerender/prerender_pending_swap_throttle.cc +++ b/chrome/browser/prerender/prerender_pending_swap_throttle.cc @@ -12,6 +12,8 @@ #include "content/public/browser/resource_request_info.h" #include "net/url_request/url_request.h" +using content::ResourceType; + namespace prerender { PrerenderPendingSwapThrottle::PrerenderPendingSwapThrottle( diff --git a/chrome/browser/prerender/prerender_resource_throttle.cc b/chrome/browser/prerender/prerender_resource_throttle.cc index 5636de8..d578f4f 100644 --- a/chrome/browser/prerender/prerender_resource_throttle.cc +++ b/chrome/browser/prerender/prerender_resource_throttle.cc @@ -14,6 +14,8 @@ #include "content/public/browser/web_contents.h" #include "net/url_request/url_request.h" +using content::ResourceType; + namespace prerender { namespace { diff --git a/chrome/browser/prerender/prerender_resource_throttle.h b/chrome/browser/prerender/prerender_resource_throttle.h index 8a691d1..3d2a43c 100644 --- a/chrome/browser/prerender/prerender_resource_throttle.h +++ b/chrome/browser/prerender/prerender_resource_throttle.h @@ -9,7 +9,7 @@ #include "base/compiler_specific.h" #include "base/memory/weak_ptr.h" #include "content/public/browser/resource_throttle.h" -#include "webkit/common/resource_type.h" +#include "content/public/common/resource_type.h" namespace net { class URLRequest; @@ -49,7 +49,7 @@ class PrerenderResourceThrottle static void WillStartRequestOnUI( const base::WeakPtr<PrerenderResourceThrottle>& throttle, const std::string& method, - ResourceType::Type resource_type, + content::ResourceType::Type resource_type, int render_process_id, int render_frame_id, const GURL& url); @@ -57,7 +57,7 @@ class PrerenderResourceThrottle static void WillRedirectRequestOnUI( const base::WeakPtr<PrerenderResourceThrottle>& throttle, const std::string& follow_only_when_prerender_shown_header, - ResourceType::Type resource_type, + content::ResourceType::Type resource_type, bool async, int render_process_id, int render_frame_id, diff --git a/chrome/browser/prerender/prerender_tracker_unittest.cc b/chrome/browser/prerender/prerender_tracker_unittest.cc index 44e1824..fa4330e 100644 --- a/chrome/browser/prerender/prerender_tracker_unittest.cc +++ b/chrome/browser/prerender/prerender_tracker_unittest.cc @@ -27,6 +27,7 @@ #include "testing/gtest/include/gtest/gtest.h" using content::BrowserThread; +using content::ResourceType; namespace prerender { diff --git a/chrome/browser/prerender/prerender_util.cc b/chrome/browser/prerender/prerender_util.cc index 6519371..67670aa 100644 --- a/chrome/browser/prerender/prerender_util.cc +++ b/chrome/browser/prerender/prerender_util.cc @@ -9,12 +9,14 @@ #include "base/metrics/sparse_histogram.h" #include "base/strings/string_util.h" #include "content/public/browser/resource_request_info.h" +#include "content/public/common/resource_type.h" #include "net/http/http_response_headers.h" #include "net/url_request/url_request.h" #include "url/url_canon.h" #include "url/url_parse.h" #include "url/url_util.h" -#include "webkit/common/resource_type.h" + +using content::ResourceType; namespace prerender { diff --git a/chrome/browser/prerender/prerender_util.h b/chrome/browser/prerender/prerender_util.h index 261e57d8..5addd03 100644 --- a/chrome/browser/prerender/prerender_util.h +++ b/chrome/browser/prerender/prerender_util.h @@ -6,8 +6,8 @@ #define CHROME_BROWSER_PRERENDER_PRERENDER_UTIL_H_ #include "base/basictypes.h" +#include "content/public/common/resource_type.h" #include "url/gurl.h" -#include "webkit/common/resource_type.h" namespace net { class HttpResponseHeaders; @@ -51,7 +51,7 @@ bool IsControlGroupExperiment(uint8 experiment_id); // Called by URLRequestResponseStarted to gather data about Pagespeed headers // into the Prerender.PagespeedHeader histogram. Public so it can be accessed // by the unit test. -void GatherPagespeedData(const ResourceType::Type resource_type, +void GatherPagespeedData(const content::ResourceType::Type resource_type, const GURL& request_url, const net::HttpResponseHeaders* response_headers); diff --git a/chrome/browser/prerender/prerender_util_unittest.cc b/chrome/browser/prerender/prerender_util_unittest.cc index af8dd1a..6ee79a4 100644 --- a/chrome/browser/prerender/prerender_util_unittest.cc +++ b/chrome/browser/prerender/prerender_util_unittest.cc @@ -11,6 +11,8 @@ #include "testing/gtest/include/gtest/gtest.h" #include "url/gurl.h" +using content::ResourceType; + namespace prerender { class PrerenderUtilTest : public testing::Test { diff --git a/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc b/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc index da4b4a7..8bbfbf3 100644 --- a/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc +++ b/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc @@ -96,6 +96,7 @@ using content::BrowserThread; using content::RenderViewHost; using content::ResourceDispatcherHostLoginDelegate; using content::ResourceRequestInfo; +using content::ResourceType; using extensions::Extension; using extensions::StreamsPrivateAPI; diff --git a/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.h b/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.h index 65bd1f7..f5bccc6 100644 --- a/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.h +++ b/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.h @@ -43,13 +43,13 @@ class ChromeResourceDispatcherHostDelegate int route_id, const std::string& method, const GURL& url, - ResourceType::Type resource_type, + content::ResourceType::Type resource_type, content::ResourceContext* resource_context) OVERRIDE; virtual void RequestBeginning( net::URLRequest* request, content::ResourceContext* resource_context, content::AppCacheService* appcache_service, - ResourceType::Type resource_type, + content::ResourceType::Type resource_type, int child_id, int route_id, ScopedVector<content::ResourceThrottle>* throttles) OVERRIDE; @@ -104,7 +104,7 @@ class ChromeResourceDispatcherHostDelegate void AppendStandardResourceThrottles( net::URLRequest* request, content::ResourceContext* resource_context, - ResourceType::Type resource_type, + content::ResourceType::Type resource_type, ScopedVector<content::ResourceThrottle>* throttles); #if defined(ENABLE_ONE_CLICK_SIGNIN) diff --git a/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate_browsertest.cc b/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate_browsertest.cc index b865298..285bc53 100644 --- a/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate_browsertest.cc +++ b/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate_browsertest.cc @@ -22,6 +22,8 @@ #include "net/test/embedded_test_server/http_response.h" #include "net/url_request/url_request.h" +using content::ResourceType; + namespace { static const char kTestPolicyHeader[] = "test_header"; static const char kServerRedirectUrl[] = "/server-redirect"; diff --git a/chrome/browser/safe_browsing/browser_feature_extractor.cc b/chrome/browser/safe_browsing/browser_feature_extractor.cc index bacc9b2..50c0ae4 100644 --- a/chrome/browser/safe_browsing/browser_feature_extractor.cc +++ b/chrome/browser/safe_browsing/browser_feature_extractor.cc @@ -31,6 +31,7 @@ using content::BrowserThread; using content::NavigationController; using content::NavigationEntry; +using content::ResourceType; using content::WebContents; namespace safe_browsing { diff --git a/chrome/browser/safe_browsing/browser_feature_extractor.h b/chrome/browser/safe_browsing/browser_feature_extractor.h index 2855042..c077e3b 100644 --- a/chrome/browser/safe_browsing/browser_feature_extractor.h +++ b/chrome/browser/safe_browsing/browser_feature_extractor.h @@ -25,8 +25,8 @@ #include "chrome/browser/history/history_types.h" #include "chrome/browser/safe_browsing/safe_browsing_service.h" #include "chrome/browser/safe_browsing/ui_manager.h" +#include "content/public/common/resource_type.h" #include "url/gurl.h" -#include "webkit/common/resource_type.h" class HistoryService; @@ -45,12 +45,12 @@ struct IPUrlInfo { std::string url; std::string method; std::string referrer; - ResourceType::Type resource_type; + content::ResourceType::Type resource_type; IPUrlInfo(const std::string& url, const std::string& method, const std::string& referrer, - const ResourceType::Type& resource_type); + const content::ResourceType::Type& resource_type); ~IPUrlInfo(); }; diff --git a/chrome/browser/safe_browsing/browser_feature_extractor_unittest.cc b/chrome/browser/safe_browsing/browser_feature_extractor_unittest.cc index c3bc13f..26c489d 100644 --- a/chrome/browser/safe_browsing/browser_feature_extractor_unittest.cc +++ b/chrome/browser/safe_browsing/browser_feature_extractor_unittest.cc @@ -35,6 +35,7 @@ #include "url/gurl.h" using content::BrowserThread; +using content::ResourceType; using content::WebContentsTester; using testing::DoAll; diff --git a/chrome/browser/safe_browsing/client_side_detection_host.cc b/chrome/browser/safe_browsing/client_side_detection_host.cc index eca7c48..d81b392 100644 --- a/chrome/browser/safe_browsing/client_side_detection_host.cc +++ b/chrome/browser/safe_browsing/client_side_detection_host.cc @@ -40,6 +40,7 @@ using content::BrowserThread; using content::NavigationEntry; using content::ResourceRequestDetails; +using content::ResourceType; using content::WebContents; namespace safe_browsing { diff --git a/chrome/browser/safe_browsing/client_side_detection_host.h b/chrome/browser/safe_browsing/client_side_detection_host.h index 1413086..c74bd6d 100644 --- a/chrome/browser/safe_browsing/client_side_detection_host.h +++ b/chrome/browser/safe_browsing/client_side_detection_host.h @@ -118,7 +118,7 @@ class ClientSideDetectionHost : public content::WebContentsObserver, const std::string& url, const std::string& method, const std::string& referrer, - const ResourceType::Type resource_type); + const content::ResourceType::Type resource_type); // From NotificationObserver. Called when a notification comes in. This // method is called in the UI thread. diff --git a/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc b/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc index 2b119e3..8e153c3 100644 --- a/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc +++ b/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc @@ -45,6 +45,7 @@ using ::testing::SetArgumentPointee; using ::testing::StrictMock; using content::BrowserThread; using content::RenderViewHostTester; +using content::ResourceType; using content::WebContents; namespace { diff --git a/chrome/browser/search/iframe_source_unittest.cc b/chrome/browser/search/iframe_source_unittest.cc index 559d208..30aee8e 100644 --- a/chrome/browser/search/iframe_source_unittest.cc +++ b/chrome/browser/search/iframe_source_unittest.cc @@ -22,6 +22,8 @@ #include "testing/gtest/include/gtest/gtest.h" #include "url/gurl.h" +using content::ResourceType; + const int kNonInstantRendererPID = 0; const char kNonInstantOrigin[] = "http://evil"; const int kInstantRendererPID = 1; diff --git a/chrome/renderer/chrome_render_process_observer.cc b/chrome/renderer/chrome_render_process_observer.cc index 2e4e54b..1565729 100644 --- a/chrome/renderer/chrome_render_process_observer.cc +++ b/chrome/renderer/chrome_render_process_observer.cc @@ -67,7 +67,7 @@ class RendererResourceDelegate : public content::ResourceDispatcherDelegate { virtual content::RequestPeer* OnRequestComplete( content::RequestPeer* current_peer, - ResourceType::Type resource_type, + content::ResourceType::Type resource_type, int error_code) OVERRIDE { // Update the browser about our cache. // Rate limit informing the host of our cache stats. diff --git a/chrome/renderer/security_filter_peer.cc b/chrome/renderer/security_filter_peer.cc index c43b451..ad76a31 100644 --- a/chrome/renderer/security_filter_peer.cc +++ b/chrome/renderer/security_filter_peer.cc @@ -21,7 +21,7 @@ SecurityFilterPeer::~SecurityFilterPeer() { // static SecurityFilterPeer* SecurityFilterPeer::CreateSecurityFilterPeerForDeniedRequest( - ResourceType::Type resource_type, + content::ResourceType::Type resource_type, content::RequestPeer* peer, int os_error) { // Create a filter for SSL and CERT errors. @@ -40,7 +40,7 @@ SecurityFilterPeer::CreateSecurityFilterPeerForDeniedRequest( case net::ERR_CERT_NAME_CONSTRAINT_VIOLATION: case net::ERR_INSECURE_RESPONSE: case net::ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN: - if (ResourceType::IsFrame(resource_type)) + if (content::ResourceType::IsFrame(resource_type)) return CreateSecurityFilterPeerForFrame(peer, os_error); // Any other content is entirely filtered-out. return new ReplaceContentPeer(peer, std::string(), std::string()); diff --git a/chrome/renderer/security_filter_peer.h b/chrome/renderer/security_filter_peer.h index 6f729b7..3520fa9 100644 --- a/chrome/renderer/security_filter_peer.h +++ b/chrome/renderer/security_filter_peer.h @@ -7,7 +7,7 @@ #include "content/public/child/request_peer.h" #include "content/public/common/resource_response_info.h" -#include "webkit/common/resource_type.h" +#include "content/public/common/resource_type.h" // The SecurityFilterPeer is a proxy to a // content::RequestPeer instance. It is used to pre-process @@ -21,7 +21,7 @@ class SecurityFilterPeer : public content::RequestPeer { virtual ~SecurityFilterPeer(); static SecurityFilterPeer* CreateSecurityFilterPeerForDeniedRequest( - ResourceType::Type resource_type, + content::ResourceType::Type resource_type, content::RequestPeer* peer, int os_error); diff --git a/components/navigation_interception/intercept_navigation_resource_throttle_unittest.cc b/components/navigation_interception/intercept_navigation_resource_throttle_unittest.cc index fd6f9da..b5c251f 100644 --- a/components/navigation_interception/intercept_navigation_resource_throttle_unittest.cc +++ b/components/navigation_interception/intercept_navigation_resource_throttle_unittest.cc @@ -31,6 +31,7 @@ #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" +using content::ResourceType; using testing::_; using testing::Eq; using testing::Ne; diff --git a/content/browser/appcache/appcache_host.h b/content/browser/appcache/appcache_host.h index 683a081..2201c8c 100644 --- a/content/browser/appcache/appcache_host.h +++ b/content/browser/appcache/appcache_host.h @@ -14,8 +14,8 @@ #include "content/browser/appcache/appcache_storage.h" #include "content/common/appcache_interfaces.h" #include "content/common/content_export.h" +#include "content/public/common/resource_type.h" #include "url/gurl.h" -#include "webkit/common/resource_type.h" namespace net { class URLRequest; diff --git a/content/browser/appcache/appcache_interceptor.h b/content/browser/appcache/appcache_interceptor.h index 34b3dd6..cbfcb24 100644 --- a/content/browser/appcache/appcache_interceptor.h +++ b/content/browser/appcache/appcache_interceptor.h @@ -7,9 +7,9 @@ #include "base/memory/singleton.h" #include "content/common/content_export.h" +#include "content/public/common/resource_type.h" #include "net/url_request/url_request.h" #include "url/gurl.h" -#include "webkit/common/resource_type.h" namespace content { class AppCacheRequestHandler; diff --git a/content/browser/appcache/appcache_request_handler.h b/content/browser/appcache/appcache_request_handler.h index 704c75c..d851685 100644 --- a/content/browser/appcache/appcache_request_handler.h +++ b/content/browser/appcache/appcache_request_handler.h @@ -10,7 +10,7 @@ #include "content/browser/appcache/appcache_entry.h" #include "content/browser/appcache/appcache_host.h" #include "content/common/content_export.h" -#include "webkit/common/resource_type.h" +#include "content/public/common/resource_type.h" namespace net { class NetworkDelegate; diff --git a/content/browser/child_process_security_policy_impl.h b/content/browser/child_process_security_policy_impl.h index 005292c..08479f2 100644 --- a/content/browser/child_process_security_policy_impl.h +++ b/content/browser/child_process_security_policy_impl.h @@ -15,8 +15,8 @@ #include "base/memory/singleton.h" #include "base/synchronization/lock.h" #include "content/public/browser/child_process_security_policy.h" +#include "content/public/common/resource_type.h" #include "webkit/common/fileapi/file_system_types.h" -#include "webkit/common/resource_type.h" class GURL; diff --git a/content/browser/loader/resource_dispatcher_host_impl.h b/content/browser/loader/resource_dispatcher_host_impl.h index e3c2353..e036714 100644 --- a/content/browser/loader/resource_dispatcher_host_impl.h +++ b/content/browser/loader/resource_dispatcher_host_impl.h @@ -36,10 +36,10 @@ #include "content/public/browser/global_request_id.h" #include "content/public/browser/notification_types.h" #include "content/public/browser/resource_dispatcher_host.h" +#include "content/public/common/resource_type.h" #include "ipc/ipc_message.h" #include "net/cookies/canonical_cookie.h" #include "net/url_request/url_request.h" -#include "webkit/common/resource_type.h" class ResourceHandler; struct ResourceHostMsg_Request; diff --git a/content/browser/loader/resource_message_filter.h b/content/browser/loader/resource_message_filter.h index 90af00e..b1baa40 100644 --- a/content/browser/loader/resource_message_filter.h +++ b/content/browser/loader/resource_message_filter.h @@ -10,7 +10,7 @@ #include "base/memory/weak_ptr.h" #include "content/common/content_export.h" #include "content/public/browser/browser_message_filter.h" -#include "webkit/common/resource_type.h" +#include "content/public/common/resource_type.h" struct ResourceHostMsg_Request; diff --git a/content/browser/loader/resource_request_info_impl.h b/content/browser/loader/resource_request_info_impl.h index 82c81c0..2fe5a8b 100644 --- a/content/browser/loader/resource_request_info_impl.h +++ b/content/browser/loader/resource_request_info_impl.h @@ -15,8 +15,8 @@ #include "base/supports_user_data.h" #include "content/public/browser/resource_request_info.h" #include "content/public/common/referrer.h" +#include "content/public/common/resource_type.h" #include "net/base/load_states.h" -#include "webkit/common/resource_type.h" namespace content { class CrossSiteResourceHandler; diff --git a/content/browser/loader/resource_scheduler_unittest.cc b/content/browser/loader/resource_scheduler_unittest.cc index f4cb0e0f..b3dbf37 100644 --- a/content/browser/loader/resource_scheduler_unittest.cc +++ b/content/browser/loader/resource_scheduler_unittest.cc @@ -16,13 +16,13 @@ #include "content/public/browser/resource_controller.h" #include "content/public/browser/resource_throttle.h" #include "content/public/common/process_type.h" +#include "content/public/common/resource_type.h" #include "net/base/host_port_pair.h" #include "net/base/request_priority.h" #include "net/http/http_server_properties_impl.h" #include "net/url_request/url_request.h" #include "net/url_request/url_request_test_util.h" #include "testing/gtest/include/gtest/gtest.h" -#include "webkit/common/resource_type.h" namespace content { diff --git a/content/browser/plugin_process_host.h b/content/browser/plugin_process_host.h index fd94944..1006eb1 100644 --- a/content/browser/plugin_process_host.h +++ b/content/browser/plugin_process_host.h @@ -20,10 +20,10 @@ #include "content/public/browser/browser_child_process_host_delegate.h" #include "content/public/browser/browser_child_process_host_iterator.h" #include "content/public/common/process_type.h" +#include "content/public/common/resource_type.h" #include "content/public/common/webplugininfo.h" #include "ipc/ipc_channel_proxy.h" #include "ui/gfx/native_widget_types.h" -#include "webkit/common/resource_type.h" struct ResourceHostMsg_Request; diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc index 70ab68a..457d6ef 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc @@ -131,6 +131,7 @@ #include "content/public/common/content_constants.h" #include "content/public/common/content_switches.h" #include "content/public/common/process_type.h" +#include "content/public/common/resource_type.h" #include "content/public/common/result_codes.h" #include "content/public/common/sandboxed_process_launcher_delegate.h" #include "content/public/common/url_constants.h" @@ -148,7 +149,6 @@ #include "ui/gl/gl_switches.h" #include "ui/native_theme/native_theme_switches.h" #include "webkit/browser/fileapi/sandbox_file_system_backend.h" -#include "webkit/common/resource_type.h" #if defined(OS_ANDROID) #include "content/browser/media/android/browser_demuxer_android.h" diff --git a/content/browser/service_worker/service_worker_provider_host.h b/content/browser/service_worker/service_worker_provider_host.h index fba49ad..f48528a 100644 --- a/content/browser/service_worker/service_worker_provider_host.h +++ b/content/browser/service_worker/service_worker_provider_host.h @@ -12,7 +12,7 @@ #include "base/memory/weak_ptr.h" #include "content/common/content_export.h" #include "content/common/service_worker/service_worker_types.h" -#include "webkit/common/resource_type.h" +#include "content/public/common/resource_type.h" namespace IPC { class Sender; diff --git a/content/browser/service_worker/service_worker_request_handler.h b/content/browser/service_worker/service_worker_request_handler.h index 0c666b5..3b99e12 100644 --- a/content/browser/service_worker/service_worker_request_handler.h +++ b/content/browser/service_worker/service_worker_request_handler.h @@ -10,8 +10,8 @@ #include "base/supports_user_data.h" #include "content/common/content_export.h" #include "content/common/service_worker/service_worker_status_code.h" +#include "content/public/common/resource_type.h" #include "net/url_request/url_request_job_factory.h" -#include "webkit/common/resource_type.h" namespace net { class NetworkDelegate; diff --git a/content/browser/service_worker/service_worker_utils.h b/content/browser/service_worker/service_worker_utils.h index 1028e29..60ce5ce 100644 --- a/content/browser/service_worker/service_worker_utils.h +++ b/content/browser/service_worker/service_worker_utils.h @@ -7,7 +7,7 @@ #include "content/common/content_export.h" #include "content/common/service_worker/service_worker_status_code.h" -#include "webkit/common/resource_type.h" +#include "content/public/common/resource_type.h" class GURL; diff --git a/content/browser/service_worker/service_worker_write_to_cache_job.h b/content/browser/service_worker/service_worker_write_to_cache_job.h index 4777b3f..cc104a7 100644 --- a/content/browser/service_worker/service_worker_write_to_cache_job.h +++ b/content/browser/service_worker/service_worker_write_to_cache_job.h @@ -11,9 +11,9 @@ #include "content/common/content_export.h" #include "content/common/service_worker/service_worker_status_code.h" #include "content/common/service_worker/service_worker_types.h" +#include "content/public/common/resource_type.h" #include "net/url_request/url_request.h" #include "net/url_request/url_request_job.h" -#include "webkit/common/resource_type.h" namespace content { diff --git a/content/browser/ssl/ssl_error_handler.h b/content/browser/ssl/ssl_error_handler.h index 87bc1da..6b0834b 100644 --- a/content/browser/ssl/ssl_error_handler.h +++ b/content/browser/ssl/ssl_error_handler.h @@ -12,8 +12,8 @@ #include "base/memory/weak_ptr.h" #include "content/common/content_export.h" #include "content/public/browser/global_request_id.h" +#include "content/public/common/resource_type.h" #include "url/gurl.h" -#include "webkit/common/resource_type.h" namespace net { class SSLInfo; diff --git a/content/browser/ssl/ssl_policy.cc b/content/browser/ssl/ssl_policy.cc index 7316455..2abee5b 100644 --- a/content/browser/ssl/ssl_policy.cc +++ b/content/browser/ssl/ssl_policy.cc @@ -18,10 +18,10 @@ #include "content/browser/ssl/ssl_request_info.h" #include "content/browser/web_contents/web_contents_impl.h" #include "content/public/browser/content_browser_client.h" +#include "content/public/common/resource_type.h" #include "content/public/common/ssl_status.h" #include "content/public/common/url_constants.h" #include "net/ssl/ssl_info.h" -#include "webkit/common/resource_type.h" namespace content { diff --git a/content/browser/ssl/ssl_policy.h b/content/browser/ssl/ssl_policy.h index c88e10c..64b9c3a 100644 --- a/content/browser/ssl/ssl_policy.h +++ b/content/browser/ssl/ssl_policy.h @@ -8,7 +8,7 @@ #include <string> #include "base/memory/ref_counted.h" -#include "webkit/common/resource_type.h" +#include "content/public/common/resource_type.h" namespace content { class NavigationEntryImpl; diff --git a/content/browser/ssl/ssl_request_info.h b/content/browser/ssl/ssl_request_info.h index cf745fe..9498c89 100644 --- a/content/browser/ssl/ssl_request_info.h +++ b/content/browser/ssl/ssl_request_info.h @@ -8,9 +8,9 @@ #include <string> #include "base/memory/ref_counted.h" +#include "content/public/common/resource_type.h" #include "net/cert/cert_status_flags.h" #include "url/gurl.h" -#include "webkit/common/resource_type.h" namespace content { diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h index db10541..3782b4e 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h @@ -30,12 +30,12 @@ #include "content/public/browser/web_contents.h" #include "content/public/common/page_transition_types.h" #include "content/public/common/renderer_preferences.h" +#include "content/public/common/resource_type.h" #include "content/public/common/three_d_api_types.h" #include "net/base/load_states.h" #include "third_party/WebKit/public/web/WebDragOperation.h" #include "ui/gfx/rect_f.h" #include "ui/gfx/size.h" -#include "webkit/common/resource_type.h" struct BrowserPluginHostMsg_ResizeGuest_Params; struct ViewHostMsg_DateTimeDialogValue_Params; diff --git a/content/browser/worker_host/worker_process_host.cc b/content/browser/worker_host/worker_process_host.cc index f085161..18a3aab 100644 --- a/content/browser/worker_host/worker_process_host.cc +++ b/content/browser/worker_host/worker_process_host.cc @@ -47,6 +47,7 @@ #include "content/public/browser/content_browser_client.h" #include "content/public/browser/user_metrics.h" #include "content/public/common/content_switches.h" +#include "content/public/common/resource_type.h" #include "content/public/common/result_codes.h" #include "content/public/common/sandboxed_process_launcher_delegate.h" #include "ipc/ipc_switches.h" @@ -56,7 +57,6 @@ #include "ui/base/ui_base_switches.h" #include "webkit/browser/fileapi/file_system_context.h" #include "webkit/browser/fileapi/sandbox_file_system_backend.h" -#include "webkit/common/resource_type.h" #if defined(OS_WIN) #include "content/common/sandbox_win.h" diff --git a/content/browser/worker_host/worker_process_host.h b/content/browser/worker_host/worker_process_host.h index 1501531..086020f 100644 --- a/content/browser/worker_host/worker_process_host.h +++ b/content/browser/worker_host/worker_process_host.h @@ -18,10 +18,10 @@ #include "content/public/browser/browser_child_process_host_delegate.h" #include "content/public/browser/browser_child_process_host_iterator.h" #include "content/public/common/process_type.h" +#include "content/public/common/resource_type.h" #include "ipc/ipc_sender.h" #include "third_party/WebKit/public/web/WebContentSecurityPolicy.h" #include "url/gurl.h" -#include "webkit/common/resource_type.h" struct ResourceHostMsg_Request; diff --git a/content/child/request_info.h b/content/child/request_info.h index 6dd1bed..ce5ab7a 100644 --- a/content/child/request_info.h +++ b/content/child/request_info.h @@ -10,11 +10,11 @@ #include <string> #include "content/common/content_export.h" +#include "content/public/common/resource_type.h" #include "net/base/request_priority.h" #include "third_party/WebKit/public/platform/WebReferrerPolicy.h" #include "third_party/WebKit/public/platform/WebURLRequest.h" #include "url/gurl.h" -#include "webkit/common/resource_type.h" namespace content { diff --git a/content/child/resource_dispatcher.cc b/content/child/resource_dispatcher.cc index 95697d9..922681b 100644 --- a/content/child/resource_dispatcher.cc +++ b/content/child/resource_dispatcher.cc @@ -25,12 +25,12 @@ #include "content/public/child/request_peer.h" #include "content/public/child/resource_dispatcher_delegate.h" #include "content/public/common/resource_response.h" +#include "content/public/common/resource_type.h" #include "net/base/net_errors.h" #include "net/base/net_util.h" #include "net/base/request_priority.h" #include "net/http/http_response_headers.h" #include "webkit/child/resource_loader_bridge.h" -#include "webkit/common/resource_type.h" using webkit_glue::ResourceLoaderBridge; diff --git a/content/child/resource_dispatcher.h b/content/child/resource_dispatcher.h index 1796c5a..f7f62ff 100644 --- a/content/child/resource_dispatcher.h +++ b/content/child/resource_dispatcher.h @@ -16,10 +16,10 @@ #include "base/memory/weak_ptr.h" #include "base/time/time.h" #include "content/common/content_export.h" +#include "content/public/common/resource_type.h" #include "ipc/ipc_listener.h" #include "ipc/ipc_sender.h" #include "net/base/request_priority.h" -#include "webkit/common/resource_type.h" struct ResourceMsg_RequestCompleteData; diff --git a/content/child/site_isolation_policy.h b/content/child/site_isolation_policy.h index 6c48697..9e594b7 100644 --- a/content/child/site_isolation_policy.h +++ b/content/child/site_isolation_policy.h @@ -12,7 +12,7 @@ #include "base/memory/linked_ptr.h" #include "base/strings/string_piece.h" #include "content/common/content_export.h" -#include "webkit/common/resource_type.h" +#include "content/public/common/resource_type.h" class GURL; diff --git a/content/common/content_param_traits_macros.h b/content/common/content_param_traits_macros.h index 42ce5b1..c3e31703 100644 --- a/content/common/content_param_traits_macros.h +++ b/content/common/content_param_traits_macros.h @@ -9,17 +9,18 @@ #define CONTENT_COMMON_CONTENT_PARAM_TRAITS_MACROS_H_ #include "content/common/content_export.h" +#include "content/public/common/resource_type.h" #include "ipc/ipc_message_macros.h" #include "third_party/WebKit/public/web/WebCompositionUnderline.h" #include "third_party/WebKit/public/web/WebContentSecurityPolicy.h" #include "third_party/WebKit/public/web/WebInputEvent.h" #include "third_party/WebKit/public/web/WebPageVisibilityState.h" -#include "webkit/common/resource_type.h" #undef IPC_MESSAGE_EXPORT #define IPC_MESSAGE_EXPORT CONTENT_EXPORT -IPC_ENUM_TRAITS_MAX_VALUE(ResourceType::Type, ResourceType::LAST_TYPE - 1) +IPC_ENUM_TRAITS_MAX_VALUE(content::ResourceType::Type, + content::ResourceType::LAST_TYPE - 1) IPC_ENUM_TRAITS_MAX_VALUE(blink::WebContentSecurityPolicyType, blink::WebContentSecurityPolicyTypeLast) IPC_ENUM_TRAITS_MIN_MAX_VALUE(blink::WebInputEvent::Type, diff --git a/content/common/resource_messages.h b/content/common/resource_messages.h index dc83e5a..9d4e1ba 100644 --- a/content/common/resource_messages.h +++ b/content/common/resource_messages.h @@ -158,7 +158,7 @@ IPC_STRUCT_BEGIN(ResourceHostMsg_Request) // What this resource load is for (main frame, sub-frame, sub-resource, // object). - IPC_STRUCT_MEMBER(ResourceType::Type, resource_type) + IPC_STRUCT_MEMBER(content::ResourceType::Type, resource_type) // The priority of this request. IPC_STRUCT_MEMBER(net::RequestPriority, priority) diff --git a/content/common/view_messages.h b/content/common/view_messages.h index 144430a..4cbdee8 100644 --- a/content/common/view_messages.h +++ b/content/common/view_messages.h @@ -1139,7 +1139,7 @@ IPC_MESSAGE_ROUTED5(ViewHostMsg_DidLoadResourceFromMemoryCache, std::string /* security info */, std::string /* http method */, std::string /* mime type */, - ResourceType::Type /* resource type */) + content::ResourceType::Type /* resource type */) // Sent when the renderer displays insecure content in a secure page. IPC_MESSAGE_ROUTED0(ViewHostMsg_DidDisplayInsecureContent) diff --git a/content/content_common.gypi b/content/content_common.gypi index 7438043..a2ef395 100644 --- a/content/content_common.gypi +++ b/content/content_common.gypi @@ -95,6 +95,8 @@ 'public/common/resource_response.h', 'public/common/resource_response_info.cc', 'public/common/resource_response_info.h', + 'public/common/resource_type.cc', + 'public/common/resource_type.h', 'public/common/result_codes.h', 'public/common/result_codes_list.h', 'public/common/sandbox_init.h', diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h index 739f4c0..5bed0a9 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h @@ -17,6 +17,7 @@ #include "base/values.h" #include "content/public/browser/certificate_request_result_type.h" #include "content/public/common/content_client.h" +#include "content/public/common/resource_type.h" #include "content/public/common/socket_permission_request.h" #include "content/public/common/window_container_type.h" #include "net/base/mime_util.h" @@ -26,7 +27,6 @@ #include "third_party/WebKit/public/web/WebNotificationPresenter.h" #include "ui/base/window_open_disposition.h" #include "webkit/browser/fileapi/file_system_context.h" -#include "webkit/common/resource_type.h" #if defined(OS_POSIX) && !defined(OS_MACOSX) #include "base/posix/global_descriptors.h" diff --git a/content/public/browser/load_from_memory_cache_details.h b/content/public/browser/load_from_memory_cache_details.h index ac9b734..93fc555 100644 --- a/content/public/browser/load_from_memory_cache_details.h +++ b/content/public/browser/load_from_memory_cache_details.h @@ -7,9 +7,9 @@ #include <string> #include "base/basictypes.h" +#include "content/public/common/resource_type.h" #include "net/cert/cert_status_flags.h" #include "url/gurl.h" -#include "webkit/common/resource_type.h" namespace content { diff --git a/content/public/browser/resource_dispatcher_host_delegate.h b/content/public/browser/resource_dispatcher_host_delegate.h index 7d02692..5f2d2e9 100644 --- a/content/public/browser/resource_dispatcher_host_delegate.h +++ b/content/public/browser/resource_dispatcher_host_delegate.h @@ -10,7 +10,7 @@ #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" #include "content/common/content_export.h" -#include "webkit/common/resource_type.h" +#include "content/public/common/resource_type.h" class GURL; template <class T> class ScopedVector; diff --git a/content/public/browser/resource_request_details.h b/content/public/browser/resource_request_details.h index 0127fef..4afb197 100644 --- a/content/public/browser/resource_request_details.h +++ b/content/public/browser/resource_request_details.h @@ -7,11 +7,11 @@ #include <string> +#include "content/public/common/resource_type.h" #include "net/base/host_port_pair.h" #include "net/cert/cert_status_flags.h" #include "net/url_request/url_request_status.h" #include "url/gurl.h" -#include "webkit/common/resource_type.h" namespace net { class URLRequest; diff --git a/content/public/browser/resource_request_info.h b/content/public/browser/resource_request_info.h index f0badee..91cd1e8 100644 --- a/content/public/browser/resource_request_info.h +++ b/content/public/browser/resource_request_info.h @@ -8,9 +8,9 @@ #include "base/basictypes.h" #include "content/common/content_export.h" #include "content/public/common/page_transition_types.h" +#include "content/public/common/resource_type.h" #include "third_party/WebKit/public/platform/WebReferrerPolicy.h" #include "third_party/WebKit/public/web/WebPageVisibilityState.h" -#include "webkit/common/resource_type.h" namespace net { class URLRequest; diff --git a/content/public/child/resource_dispatcher_delegate.h b/content/public/child/resource_dispatcher_delegate.h index 1c61688..31c5b90 100644 --- a/content/public/child/resource_dispatcher_delegate.h +++ b/content/public/child/resource_dispatcher_delegate.h @@ -8,7 +8,7 @@ #include <string> #include "content/common/content_export.h" -#include "webkit/common/resource_type.h" +#include "content/public/common/resource_type.h" class GURL; diff --git a/webkit/common/resource_type.cc b/content/public/common/resource_type.cc index 7e938db..56dfec7 100644 --- a/webkit/common/resource_type.cc +++ b/content/public/common/resource_type.cc @@ -1,13 +1,15 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "webkit/common/resource_type.h" +#include "content/public/common/resource_type.h" #include "base/logging.h" using blink::WebURLRequest; +namespace content { + // static ResourceType::Type ResourceType::FromTargetType( WebURLRequest::TargetType type) { @@ -49,3 +51,5 @@ ResourceType::Type ResourceType::FromTargetType( return ResourceType::SUB_RESOURCE; } } + +} // namespace content diff --git a/webkit/common/resource_type.h b/content/public/common/resource_type.h index 4cfd0f6e..fbf7326 100644 --- a/webkit/common/resource_type.h +++ b/content/public/common/resource_type.h @@ -1,15 +1,17 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef WEBKIT_COMMON_RESOURCE_TYPE_H__ -#define WEBKIT_COMMON_RESOURCE_TYPE_H__ +#ifndef CONTENT_PUBLIC_COMMON_RESOURCE_TYPE_H_ +#define CONTENT_PUBLIC_COMMON_RESOURCE_TYPE_H_ -#include "base/basictypes.h" +#include "base/macros.h" +#include "content/common/content_export.h" #include "third_party/WebKit/public/platform/WebURLRequest.h" -#include "webkit/common/webkit_common_export.h" -class ResourceType { +namespace content { + +class CONTENT_EXPORT ResourceType { public: // Used in histograms, so please add new types at the end, and rename unused // entries to RESOURCETYPE_UNUSED_0, etc... @@ -35,6 +37,8 @@ class ResourceType { // everytime. }; + static Type FromTargetType(blink::WebURLRequest::TargetType type); + static bool ValidType(int32 type) { return type >= MAIN_FRAME && type < LAST_TYPE; } @@ -43,9 +47,6 @@ class ResourceType { return static_cast<Type>(type); } - WEBKIT_COMMON_EXPORT static Type FromTargetType( - blink::WebURLRequest::TargetType type); - static bool IsFrame(ResourceType::Type type) { return type == MAIN_FRAME || type == SUB_FRAME; } @@ -69,8 +70,9 @@ class ResourceType { } private: - // Don't instantiate this class. - ResourceType(); - ~ResourceType(); + DISALLOW_COPY_AND_ASSIGN(ResourceType); }; -#endif // WEBKIT_COMMON_RESOURCE_TYPE_H__ + +} // namespace content + +#endif // CONTENT_PUBLIC_COMMON_RESOURCE_TYPE_H_ diff --git a/extensions/browser/extension_protocols.cc b/extensions/browser/extension_protocols.cc index a0dc726..e4cd193 100644 --- a/extensions/browser/extension_protocols.cc +++ b/extensions/browser/extension_protocols.cc @@ -59,6 +59,7 @@ using content::BrowserThread; using content::ResourceRequestInfo; +using content::ResourceType; using extensions::Extension; using extensions::SharedModuleInfo; diff --git a/extensions/browser/extension_protocols_unittest.cc b/extensions/browser/extension_protocols_unittest.cc index 0aa097b..02d9fdf 100644 --- a/extensions/browser/extension_protocols_unittest.cc +++ b/extensions/browser/extension_protocols_unittest.cc @@ -25,6 +25,8 @@ #include "net/url_request/url_request_test_util.h" #include "testing/gtest/include/gtest/gtest.h" +using content::ResourceType; + namespace extensions { scoped_refptr<Extension> CreateTestExtension(const std::string& name, diff --git a/webkit/common/BUILD.gn b/webkit/common/BUILD.gn index 37f6634..9de080f 100644 --- a/webkit/common/BUILD.gn +++ b/webkit/common/BUILD.gn @@ -9,8 +9,6 @@ component("common") { sources = [ "data_element.cc", "data_element.h", - "resource_type.cc", - "resource_type.h", "webkit_common_export.h", "webpreferences.cc", "webpreferences.h", diff --git a/webkit/common/webkit_common.gyp b/webkit/common/webkit_common.gyp index 5e3e8b8..5710b37 100644 --- a/webkit/common/webkit_common.gyp +++ b/webkit/common/webkit_common.gyp @@ -42,8 +42,6 @@ 'sources': [ 'data_element.cc', 'data_element.h', - 'resource_type.cc', - 'resource_type.h', 'webkit_common_export.h', 'webpreferences.cc', 'webpreferences.h', |