diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-31 00:59:40 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-31 00:59:40 +0000 |
commit | 6c1e05217fb089245b77e39fd6a46f26c4b85e54 (patch) | |
tree | 770ce08ff82343a522b92e37558faa1aff8e4804 /content/child/resource_dispatcher_unittest.cc | |
parent | 1ecda815adaacdc68dc7769c1f34d5182799abc4 (diff) | |
download | chromium_src-6c1e05217fb089245b77e39fd6a46f26c4b85e54.zip chromium_src-6c1e05217fb089245b77e39fd6a46f26c4b85e54.tar.gz chromium_src-6c1e05217fb089245b77e39fd6a46f26c4b85e54.tar.bz2 |
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/
Review URL: https://codereview.chromium.org/425653002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@286665 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/child/resource_dispatcher_unittest.cc')
-rw-r--r-- | content/child/resource_dispatcher_unittest.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/content/child/resource_dispatcher_unittest.cc b/content/child/resource_dispatcher_unittest.cc index 3e427ca..4e95428 100644 --- a/content/child/resource_dispatcher_unittest.cc +++ b/content/child/resource_dispatcher_unittest.cc @@ -330,7 +330,7 @@ class ResourceDispatcherTest : public testing::Test, public IPC::Sender { request_info.headers = std::string(); request_info.load_flags = 0; request_info.requestor_pid = 0; - request_info.request_type = ResourceType::SUB_RESOURCE; + request_info.request_type = RESOURCE_TYPE_SUB_RESOURCE; request_info.appcache_host_id = kAppCacheNoHostId; request_info.routing_id = 0; request_info.download_to_file = download_to_file; |