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

Side by Side Diff: third_party/WebKit/Source/core/fetch/ResourceLoader.h

Issue 2105713002: Render process changes for ResourceTiming sizes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@resource_timing_sizes_browser_process
Patch Set: Initialise encoded_body_length for sync XHR to data: URLs Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2005, 2006, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2006, 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 // A succesful load will consist of: 61 // A succesful load will consist of:
62 // 0+ willFollowRedirect() 62 // 0+ willFollowRedirect()
63 // 0+ didSendData() 63 // 0+ didSendData()
64 // 1 didReceiveResponse() 64 // 1 didReceiveResponse()
65 // 0-1 didReceiveCachedMetadata() 65 // 0-1 didReceiveCachedMetadata()
66 // 0+ didReceiveData() or didDownloadData(), but never both 66 // 0+ didReceiveData() or didDownloadData(), but never both
67 // 1 didFinishLoading() 67 // 1 didFinishLoading()
68 // A failed load is indicated by 1 didFail(), which can occur at any time 68 // A failed load is indicated by 1 didFail(), which can occur at any time
69 // before didFinishLoading(), including synchronous inside one of the other 69 // before didFinishLoading(), including synchronous inside one of the other
70 // callbacks via ResourceLoader::cancel() 70 // callbacks via ResourceLoader::cancel()
71 void willFollowRedirect(WebURLLoader*, WebURLRequest&, const WebURLResponse& redirectResponse) override; 71 void willFollowRedirect(WebURLLoader*, WebURLRequest&, const WebURLResponse& redirectResponse, int64_t encodedDataLength) override;
72 void didSendData(WebURLLoader*, unsigned long long bytesSent, unsigned long long totalBytesToBeSent) override; 72 void didSendData(WebURLLoader*, unsigned long long bytesSent, unsigned long long totalBytesToBeSent) override;
73 void didReceiveResponse(WebURLLoader*, const WebURLResponse&) override; 73 void didReceiveResponse(WebURLLoader*, const WebURLResponse&) override;
74 void didReceiveResponse(WebURLLoader*, const WebURLResponse&, WebDataConsume rHandle*) override; 74 void didReceiveResponse(WebURLLoader*, const WebURLResponse&, WebDataConsume rHandle*) override;
75 void didReceiveCachedMetadata(WebURLLoader*, const char* data, int length) o verride; 75 void didReceiveCachedMetadata(WebURLLoader*, const char* data, int length) o verride;
76 void didReceiveData(WebURLLoader*, const char*, int, int encodedDataLength) override; 76 void didReceiveData(WebURLLoader*, const char*, int, int encodedDataLength, int encodedBodyLength) override;
77 void didDownloadData(WebURLLoader*, int, int) override; 77 void didDownloadData(WebURLLoader*, int, int) override;
78 void didFinishLoading(WebURLLoader*, double finishTime, int64_t encodedDataL ength) override; 78 void didFinishLoading(WebURLLoader*, double finishTime, int64_t encodedDataL ength) override;
79 void didFail(WebURLLoader*, const WebURLError&) override; 79 void didFail(WebURLLoader*, const WebURLError&) override;
80 80
81 void didFinishLoadingFirstPartInMultipart(); 81 void didFinishLoadingFirstPartInMultipart();
82 82
83 private: 83 private:
84 // Assumes ResourceFetcher and Resource are non-null. 84 // Assumes ResourceFetcher and Resource are non-null.
85 ResourceLoader(ResourceFetcher*, Resource*); 85 ResourceLoader(ResourceFetcher*, Resource*);
86 86
87 void requestSynchronously(const ResourceRequest&); 87 void requestSynchronously(const ResourceRequest&);
88 88
89 bool responseNeedsAccessControlCheck() const; 89 bool responseNeedsAccessControlCheck() const;
90 90
91 std::unique_ptr<WebURLLoader> m_loader; 91 std::unique_ptr<WebURLLoader> m_loader;
92 Member<ResourceFetcher> m_fetcher; 92 Member<ResourceFetcher> m_fetcher;
93 Member<Resource> m_resource; 93 Member<Resource> m_resource;
94 }; 94 };
95 95
96 } // namespace blink 96 } // namespace blink
97 97
98 #endif 98 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/fetch/ResourceFetcherTest.cpp ('k') | third_party/WebKit/Source/core/fetch/ResourceLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698