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

Side by Side Diff: Source/core/fetch/RawResource.h

Issue 673243002: Rename Resource::willSendRequest() to willFollowRedirect() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressed #4 Created 6 years, 2 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
« no previous file with comments | « Source/core/fetch/CachingCorrectnessTest.cpp ('k') | Source/core/fetch/RawResource.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de)
3 Copyright (C) 2001 Dirk Mueller <mueller@kde.org> 3 Copyright (C) 2001 Dirk Mueller <mueller@kde.org>
4 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) 4 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
5 Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. 5 Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
6 6
7 This library is free software; you can redistribute it and/or 7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Library General Public 8 modify it under the terms of the GNU Library General Public
9 License as published by the Free Software Foundation; either 9 License as published by the Free Software Foundation; either
10 version 2 of the License, or (at your option) any later version. 10 version 2 of the License, or (at your option) any later version.
(...skipping 22 matching lines...) Expand all
33 public: 33 public:
34 typedef RawResourceClient ClientType; 34 typedef RawResourceClient ClientType;
35 35
36 RawResource(const ResourceRequest&, Type); 36 RawResource(const ResourceRequest&, Type);
37 37
38 // FIXME: AssociatedURLLoader shouldn't be a DocumentThreadableLoader and th erefore shouldn't 38 // FIXME: AssociatedURLLoader shouldn't be a DocumentThreadableLoader and th erefore shouldn't
39 // use RawResource. However, it is, and it needs to be able to defer loading . 39 // use RawResource. However, it is, and it needs to be able to defer loading .
40 // This can be fixed by splitting CORS preflighting out of DocumentThreacabl eLoader. 40 // This can be fixed by splitting CORS preflighting out of DocumentThreacabl eLoader.
41 void setDefersLoading(bool); 41 void setDefersLoading(bool);
42 42
43 virtual bool canReuse(const ResourceRequest&) const override; 43 bool canReuse(const ResourceRequest&) const override;
44 44
45 private: 45 private:
46 virtual void didAddClient(ResourceClient*) override; 46 void didAddClient(ResourceClient*) override;
47 virtual void appendData(const char*, unsigned) override; 47 void appendData(const char*, unsigned) override;
48 48
49 virtual bool shouldIgnoreHTTPStatusCodeErrors() const override { return true ; } 49 bool shouldIgnoreHTTPStatusCodeErrors() const override { return true; }
50 50
51 virtual void willSendRequest(ResourceRequest&, const ResourceResponse&) over ride; 51 void willFollowRedirect(ResourceRequest&, const ResourceResponse&) override;
52 virtual void updateRequest(const ResourceRequest&) override; 52 void updateRequest(const ResourceRequest&) override;
53 virtual void responseReceived(const ResourceResponse&) override; 53 void responseReceived(const ResourceResponse&) override;
54 virtual void didSendData(unsigned long long bytesSent, unsigned long long to talBytesToBeSent) override; 54 void didSendData(unsigned long long bytesSent, unsigned long long totalBytes ToBeSent) override;
55 virtual void didDownloadData(int) override; 55 void didDownloadData(int) override;
56 }; 56 };
57 57
58 #if ENABLE(SECURITY_ASSERT) 58 #if ENABLE(SECURITY_ASSERT)
59 inline bool isRawResource(const Resource& resource) 59 inline bool isRawResource(const Resource& resource)
60 { 60 {
61 Resource::Type type = resource.type(); 61 Resource::Type type = resource.type();
62 return type == Resource::MainResource || type == Resource::Raw || type == Re source::TextTrack || type == Resource::Media || type == Resource::ImportResource ; 62 return type == Resource::MainResource || type == Resource::Raw || type == Re source::TextTrack || type == Resource::Media || type == Resource::ImportResource ;
63 } 63 }
64 #endif 64 #endif
65 inline RawResource* toRawResource(const ResourcePtr<Resource>& resource) 65 inline RawResource* toRawResource(const ResourcePtr<Resource>& resource)
(...skipping 12 matching lines...) Expand all
78 virtual void responseReceived(Resource*, const ResourceResponse&) { } 78 virtual void responseReceived(Resource*, const ResourceResponse&) { }
79 virtual void dataReceived(Resource*, const char* /* data */, unsigned /* len gth */) { } 79 virtual void dataReceived(Resource*, const char* /* data */, unsigned /* len gth */) { }
80 virtual void redirectReceived(Resource*, ResourceRequest&, const ResourceRes ponse&) { } 80 virtual void redirectReceived(Resource*, ResourceRequest&, const ResourceRes ponse&) { }
81 virtual void updateRequest(Resource*, const ResourceRequest&) { } 81 virtual void updateRequest(Resource*, const ResourceRequest&) { }
82 virtual void dataDownloaded(Resource*, int) { } 82 virtual void dataDownloaded(Resource*, int) { }
83 }; 83 };
84 84
85 } 85 }
86 86
87 #endif // RawResource_h 87 #endif // RawResource_h
OLDNEW
« no previous file with comments | « Source/core/fetch/CachingCorrectnessTest.cpp ('k') | Source/core/fetch/RawResource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698