Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(227)

Issue 425653002: content: ResourceType cleanup. (Closed)

Created:
6 years, 4 months ago by tfarina
Modified:
6 years, 4 months ago
Reviewers:
jam, Mike West
CC:
chromium-reviews, michaeln, extensions-reviews_chromium.org, nasko+codewatch_chromium.org, creis+watch_chromium.org, tzik, serviceworker-reviews, jam, kinuko+serviceworker, nhiroki, darin-cc_chromium.org, horo+watch_chromium.org, chromium-apps-reviews_chromium.org, jsbell+serviceworker_chromium.org, android-webview-reviews_chromium.org, alecflett+watch_chromium.org
Project:
chromium
Visibility:
Public.

Description

content: ResourceType cleanup. 0) Converted the ResourceType::Type enum to ResourceType enum in content namespace, like this: enum ResourceType { RESOURCE_TYPE_MAIN_FRAME = 0, //... RESOURCE_TYPE_SUB_FRAME, // ... RESOURCE_TYPE_STYLESHEET, // ... . . . }; 1) FromWebURLRequest() is is only called from within content (child & renderer), moved into content/child/web_url_request_util.* and renamed to WebURLRequestToResourceType(). 2) ValidType/FromInt/IsSubresource aren't called from anywhere. Removed. 3) IsSharedWorker/IsServiceWorker are not necessary, they're just an enum comparison and are only called in 5 places. Removed them and just the if check directly. -IsFrame is called in a number of places. Leave it in this header as a function. Since it's not scoped in a class anymore, it needs a more descriptive name. Renamed to IsResourceTypeFrame(). BUG=None TEST=None R=jam@chromium.org TBR=darin@chromium # trivial changes all around src/ Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=286665

Patch Set 1 #

Patch Set 2 : content links #

Patch Set 3 : chrome side #

Patch Set 4 : web_url_request_util #

Patch Set 5 : revert extensions/BUILD.gn change #

Patch Set 6 : REBASE #

Patch Set 7 : one fix #

Patch Set 8 : REBASE #

Unified diffs Side-by-side diffs Delta from patch set Stats (+629 lines, -695 lines) Patch
M android_webview/browser/aw_content_browser_client.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M android_webview/browser/aw_content_browser_client.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc View 1 2 3 4 5 4 chunks +7 lines, -5 lines 0 comments Download
M android_webview/native/aw_contents_io_thread_client_impl.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/captive_portal/captive_portal_tab_helper.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/captive_portal/captive_portal_tab_helper.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/captive_portal/captive_portal_tab_helper_unittest.cc View 1 2 6 chunks +9 lines, -6 lines 0 comments Download
M chrome/browser/chrome_content_browser_client.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/login/signin/merge_session_throttle.h View 1 2 2 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/chromeos/login/signin/merge_session_throttle.cc View 1 2 3 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.cc View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute_unittest.cc View 1 2 2 chunks +15 lines, -3 lines 0 comments Download
M chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_unittest.cc View 1 2 3 chunks +21 lines, -3 lines 0 comments Download
M chrome/browser/extensions/api/web_navigation/web_navigation_api.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/web_navigation/web_navigation_apitest.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/web_request/web_request_api.h View 1 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/web_request/web_request_api.cc View 1 2 3 4 5 8 chunks +11 lines, -10 lines 0 comments Download
M chrome/browser/extensions/api/web_request/web_request_api_helpers.h View 1 1 chunk +4 lines, -4 lines 0 comments Download
M chrome/browser/extensions/api/web_request/web_request_api_helpers.cc View 1 2 3 chunks +15 lines, -15 lines 0 comments Download
M chrome/browser/extensions/api/web_request/web_request_permissions_unittest.cc View 1 2 2 chunks +14 lines, -6 lines 0 comments Download
M chrome/browser/extensions/url_request_util.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/user_script_listener.h View 1 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/user_script_listener.cc View 1 2 2 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/extensions/user_script_listener_unittest.cc View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/guest_view/web_view/web_view_guest.cc View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/net/chrome_network_delegate.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/prerender/prerender_contents.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/prerender/prerender_pending_swap_throttle.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/prerender/prerender_resource_throttle.h View 1 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/prerender/prerender_resource_throttle.cc View 1 2 4 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/prerender/prerender_tracker_unittest.cc View 1 2 3 chunks +21 lines, -8 lines 0 comments Download
M chrome/browser/prerender/prerender_util.h View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/prerender/prerender_util.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/prerender/prerender_util_unittest.cc View 1 2 8 chunks +9 lines, -8 lines 0 comments Download
M chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.h View 1 2 3 4 5 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc View 1 2 3 4 5 11 chunks +16 lines, -14 lines 0 comments Download
M chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate_browsertest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/safe_browsing/browser_feature_extractor.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/safe_browsing/browser_feature_extractor.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/safe_browsing/browser_feature_extractor_unittest.cc View 1 2 2 chunks +8 lines, -8 lines 0 comments Download
M chrome/browser/safe_browsing/client_side_detection_host.h View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/safe_browsing/client_side_detection_host.cc View 1 1 chunk +5 lines, -6 lines 0 comments Download
M chrome/browser/safe_browsing/client_side_detection_host_unittest.cc View 1 2 4 chunks +9 lines, -6 lines 0 comments Download
M chrome/browser/search/iframe_source_unittest.cc View 1 2 1 chunk +8 lines, -7 lines 0 comments Download
M chrome/renderer/chrome_render_process_observer.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/renderer/security_filter_peer.h View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/renderer/security_filter_peer.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M chromecast/shell/browser/cast_content_browser_client.h View 1 1 chunk +1 line, -1 line 0 comments Download
M chromecast/shell/browser/cast_content_browser_client.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M components/navigation_interception/intercept_navigation_resource_throttle_unittest.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M content/browser/appcache/appcache_host.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/appcache/appcache_host.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/appcache/appcache_interceptor.h View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/appcache/appcache_interceptor.cc View 1 2 chunks +7 lines, -4 lines 0 comments Download
M content/browser/appcache/appcache_request_handler.h View 1 2 chunks +5 lines, -5 lines 0 comments Download
M content/browser/appcache/appcache_request_handler.cc View 1 4 chunks +16 lines, -12 lines 0 comments Download
M content/browser/appcache/appcache_request_handler_unittest.cc View 1 19 chunks +22 lines, -22 lines 0 comments Download
M content/browser/appcache/appcache_storage_impl_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/child_process_security_policy_impl.h View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/child_process_security_policy_impl.cc View 1 1 chunk +4 lines, -5 lines 0 comments Download
M content/browser/cross_site_transfer_browsertest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/loader/async_resource_handler.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/loader/cross_site_resource_handler.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/loader/resource_dispatcher_host_impl.cc View 1 2 3 4 5 9 chunks +16 lines, -16 lines 0 comments Download
M content/browser/loader/resource_dispatcher_host_unittest.cc View 1 2 3 4 5 6 7 35 chunks +60 lines, -60 lines 0 comments Download
M content/browser/loader/resource_loader.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/loader/resource_loader_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/loader/resource_message_filter.h View 1 1 chunk +1 line, -2 lines 0 comments Download
M content/browser/loader/resource_request_info_impl.h View 1 3 chunks +3 lines, -3 lines 0 comments Download
M content/browser/loader/resource_request_info_impl.cc View 1 4 chunks +10 lines, -11 lines 0 comments Download
M content/browser/loader/resource_scheduler_unittest.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 6 7 2 chunks +4 lines, -4 lines 0 comments Download
M content/browser/renderer_host/socket_stream_dispatcher_host.h View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/socket_stream_dispatcher_host.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/renderer_host/websocket_host.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M content/browser/service_worker/service_worker_context_request_handler.h View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/service_worker/service_worker_context_request_handler.cc View 1 2 chunks +3 lines, -3 lines 0 comments Download
M content/browser/service_worker/service_worker_controllee_request_handler.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M content/browser/service_worker/service_worker_controllee_request_handler.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M content/browser/service_worker/service_worker_controllee_request_handler_unittest.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M content/browser/service_worker/service_worker_provider_host.h View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/service_worker/service_worker_provider_host.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/service_worker/service_worker_request_handler.h View 1 2 chunks +3 lines, -3 lines 0 comments Download
M content/browser/service_worker/service_worker_request_handler.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/service_worker/service_worker_utils.h View 1 1 chunk +4 lines, -9 lines 0 comments Download
M content/browser/service_worker/service_worker_write_to_cache_job.h View 1 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/service_worker/service_worker_write_to_cache_job.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/ssl/ssl_cert_error_handler.h View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/ssl/ssl_cert_error_handler.cc View 1 1 chunk +6 lines, -2 lines 0 comments Download
M content/browser/ssl/ssl_error_handler.h View 1 3 chunks +3 lines, -3 lines 0 comments Download
M content/browser/ssl/ssl_error_handler.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/ssl/ssl_manager.h View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/ssl/ssl_manager.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/ssl/ssl_request_info.h View 1 2 chunks +3 lines, -3 lines 0 comments Download
M content/browser/ssl/ssl_request_info.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/transition_browsertest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/web_contents/web_contents_impl.h View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M content/child/npapi/plugin_url_fetcher.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/child/request_info.h View 1 1 chunk +1 line, -1 line 0 comments Download
M content/child/request_info.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/child/resource_dispatcher.h View 1 4 chunks +4 lines, -3 lines 0 comments Download
M content/child/resource_dispatcher.cc View 1 3 chunks +3 lines, -3 lines 0 comments Download
M content/child/resource_dispatcher_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/child/site_isolation_policy.h View 1 4 chunks +3 lines, -5 lines 0 comments Download
M content/child/site_isolation_policy.cc View 1 3 chunks +3 lines, -3 lines 0 comments Download
M content/child/web_url_loader_impl.cc View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
A content/child/web_url_request_util.h View 1 2 3 1 chunk +22 lines, -0 lines 0 comments Download
A + content/child/web_url_request_util.cc View 1 2 3 3 chunks +24 lines, -25 lines 0 comments Download
M content/common/content_param_traits_macros.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
M content/common/resource_messages.h View 1 1 chunk +1 line, -1 line 0 comments Download
M content/common/view_messages.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M content/content_child.gypi View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M content/public/browser/content_browser_client.h View 1 2 3 4 5 1 chunk +10 lines, -11 lines 0 comments Download
M content/public/browser/load_from_memory_cache_details.h View 1 2 chunks +2 lines, -2 lines 0 comments Download
M content/public/browser/load_from_memory_cache_details.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/public/browser/resource_dispatcher_host_delegate.h View 1 2 3 4 5 3 chunks +39 lines, -45 lines 0 comments Download
M content/public/browser/resource_dispatcher_host_delegate.cc View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M content/public/browser/resource_request_details.h View 1 chunk +1 line, -1 line 0 comments Download
M content/public/browser/resource_request_info.h View 2 chunks +8 lines, -9 lines 0 comments Download
M content/public/child/resource_dispatcher_delegate.h View 1 chunk +7 lines, -9 lines 0 comments Download
M content/public/common/resource_type.h View 1 1 chunk +23 lines, -62 lines 0 comments Download
M content/public/common/resource_type.cc View 1 chunk +2 lines, -110 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 2 chunks +2 lines, -1 line 0 comments Download
M extensions/browser/extension_protocols.cc View 1 chunk +1 line, -1 line 0 comments Download
M extensions/browser/extension_protocols_unittest.cc View 1 9 chunks +9 lines, -9 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
Mike West
I'm not an OWNER for any of this code, but I'd suggest that you break ...
6 years, 4 months ago (2014-07-28 06:46:56 UTC) #1
jam
lgtm
6 years, 4 months ago (2014-07-28 22:57:46 UTC) #2
tfarina
John, I made two changes here: 1) target_type_conversion.* to web_url_request_util.* 2) FromWebURLRequest() to WebURLRequestToResourceType() And ...
6 years, 4 months ago (2014-07-30 01:12:55 UTC) #3
tfarina
The CQ bit was checked by tfarina@chromium.org
6 years, 4 months ago (2014-07-30 02:45:32 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tfarina@chromium.org/425653002/100001
6 years, 4 months ago (2014-07-30 02:47:31 UTC) #5
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_clang_dbg on tryserver.chromium.linux ...
6 years, 4 months ago (2014-07-30 03:47:50 UTC) #6
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-07-30 03:57:18 UTC) #7
commit-bot: I haz the power
Try jobs failed on following builders: android_clang_dbg on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_clang_dbg/builds/1202) android_dbg on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_dbg/builds/1329) linux_chromium_chromeos_clang_dbg ...
6 years, 4 months ago (2014-07-30 03:57:20 UTC) #8
tfarina
The CQ bit was checked by tfarina@chromium.org
6 years, 4 months ago (2014-07-30 14:26:56 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tfarina@chromium.org/425653002/120001
6 years, 4 months ago (2014-07-30 14:27:48 UTC) #10
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_chromium_x64_rel on tryserver.chromium.win ...
6 years, 4 months ago (2014-07-30 17:42:57 UTC) #11
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-07-30 19:10:58 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel on tryserver.chromium.win (http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel/builds/1516)
6 years, 4 months ago (2014-07-30 19:10:59 UTC) #13
tfarina
The CQ bit was checked by tfarina@chromium.org
6 years, 4 months ago (2014-07-30 19:17:56 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tfarina@chromium.org/425653002/140001
6 years, 4 months ago (2014-07-30 19:19:28 UTC) #15
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_gpu on tryserver.chromium.gpu ...
6 years, 4 months ago (2014-07-30 21:02:07 UTC) #16
commit-bot: I haz the power
6 years, 4 months ago (2014-07-31 01:00:01 UTC) #17
Message was sent while issue was closed.
Change committed as 286665

Powered by Google App Engine
This is Rietveld 408576698