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

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

Issue 134443002: Update fetch / loader classes to use OVERRIDE / FINAL when needed (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: No OVERRIDE / FINAL in web Created 6 years, 11 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/MockImageResourceClient.h ('k') | Source/core/fetch/ResourceFetcher.h » ('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 12 matching lines...) Expand all
23 #ifndef RawResource_h 23 #ifndef RawResource_h
24 #define RawResource_h 24 #define RawResource_h
25 25
26 #include "core/fetch/ResourceClient.h" 26 #include "core/fetch/ResourceClient.h"
27 #include "core/fetch/ResourcePtr.h" 27 #include "core/fetch/ResourcePtr.h"
28 28
29 namespace WebCore { 29 namespace WebCore {
30 class RawResourceCallback; 30 class RawResourceCallback;
31 class RawResourceClient; 31 class RawResourceClient;
32 32
33 class RawResource : public Resource { 33 class RawResource FINAL : public Resource {
34 public: 34 public:
35 typedef RawResourceClient ClientType; 35 typedef RawResourceClient ClientType;
36 36
37 RawResource(const ResourceRequest&, Type); 37 RawResource(const ResourceRequest&, Type);
38 38
39 // FIXME: AssociatedURLLoader shouldn't be a DocumentThreadableLoader and th erefore shouldn't 39 // FIXME: AssociatedURLLoader shouldn't be a DocumentThreadableLoader and th erefore shouldn't
40 // use RawResource. However, it is, and it needs to be able to defer loading . 40 // use RawResource. However, it is, and it needs to be able to defer loading .
41 // This can be fixed by splitting CORS preflighting out of DocumentThreacabl eLoader. 41 // This can be fixed by splitting CORS preflighting out of DocumentThreacabl eLoader.
42 virtual void setDefersLoading(bool); 42 void setDefersLoading(bool);
43 43
44 virtual bool canReuse(const ResourceRequest&) const; 44 virtual bool canReuse(const ResourceRequest&) const OVERRIDE;
45 45
46 private: 46 private:
47 virtual void didAddClient(ResourceClient*); 47 virtual void didAddClient(ResourceClient*) OVERRIDE;
48 virtual void appendData(const char*, int) OVERRIDE; 48 virtual void appendData(const char*, int) OVERRIDE;
49 49
50 virtual bool shouldIgnoreHTTPStatusCodeErrors() const { return true; } 50 virtual bool shouldIgnoreHTTPStatusCodeErrors() const OVERRIDE { return true ; }
51 51
52 virtual void willSendRequest(ResourceRequest&, const ResourceResponse&); 52 virtual void willSendRequest(ResourceRequest&, const ResourceResponse&) OVER RIDE;
53 virtual void updateRequest(const ResourceRequest&); 53 virtual void updateRequest(const ResourceRequest&) OVERRIDE;
54 virtual void responseReceived(const ResourceResponse&); 54 virtual void responseReceived(const ResourceResponse&) OVERRIDE;
55 virtual void didSendData(unsigned long long bytesSent, unsigned long long to talBytesToBeSent); 55 virtual void didSendData(unsigned long long bytesSent, unsigned long long to talBytesToBeSent) OVERRIDE;
56 virtual void didDownloadData(int); 56 virtual void didDownloadData(int) OVERRIDE;
57 57
58 struct RedirectPair { 58 struct RedirectPair {
59 public: 59 public:
60 explicit RedirectPair(const ResourceRequest& request, const ResourceResp onse& redirectResponse) 60 explicit RedirectPair(const ResourceRequest& request, const ResourceResp onse& redirectResponse)
61 : m_request(request) 61 : m_request(request)
62 , m_redirectResponse(redirectResponse) 62 , m_redirectResponse(redirectResponse)
63 { 63 {
64 } 64 }
65 65
66 const ResourceRequest m_request; 66 const ResourceRequest m_request;
(...skipping 13 matching lines...) Expand all
80 inline RawResource* toRawResource(const ResourcePtr<Resource>& resource) 80 inline RawResource* toRawResource(const ResourcePtr<Resource>& resource)
81 { 81 {
82 ASSERT_WITH_SECURITY_IMPLICATION(!resource || isRawResource(*resource.get()) ); 82 ASSERT_WITH_SECURITY_IMPLICATION(!resource || isRawResource(*resource.get()) );
83 return static_cast<RawResource*>(resource.get()); 83 return static_cast<RawResource*>(resource.get());
84 } 84 }
85 85
86 class RawResourceClient : public ResourceClient { 86 class RawResourceClient : public ResourceClient {
87 public: 87 public:
88 virtual ~RawResourceClient() { } 88 virtual ~RawResourceClient() { }
89 static ResourceClientType expectedType() { return RawResourceType; } 89 static ResourceClientType expectedType() { return RawResourceType; }
90 virtual ResourceClientType resourceClientType() const { return expectedType( ); } 90 virtual ResourceClientType resourceClientType() const OVERRIDE FINAL { retur n expectedType(); }
91 91
92 virtual void dataSent(Resource*, unsigned long long /* bytesSent */, unsigne d long long /* totalBytesToBeSent */) { } 92 virtual void dataSent(Resource*, unsigned long long /* bytesSent */, unsigne d long long /* totalBytesToBeSent */) { }
93 virtual void responseReceived(Resource*, const ResourceResponse&) { } 93 virtual void responseReceived(Resource*, const ResourceResponse&) { }
94 virtual void dataReceived(Resource*, const char* /* data */, int /* length * /) { } 94 virtual void dataReceived(Resource*, const char* /* data */, int /* length * /) { }
95 virtual void redirectReceived(Resource*, ResourceRequest&, const ResourceRes ponse&) { } 95 virtual void redirectReceived(Resource*, ResourceRequest&, const ResourceRes ponse&) { }
96 virtual void updateRequest(Resource*, const ResourceRequest&) { } 96 virtual void updateRequest(Resource*, const ResourceRequest&) { }
97 virtual void dataDownloaded(Resource*, int) { } 97 virtual void dataDownloaded(Resource*, int) { }
98 }; 98 };
99 99
100 } 100 }
101 101
102 #endif // RawResource_h 102 #endif // RawResource_h
OLDNEW
« no previous file with comments | « Source/core/fetch/MockImageResourceClient.h ('k') | Source/core/fetch/ResourceFetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698