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

Side by Side Diff: content/public/child/request_peer.h

Issue 1144033002: Make SharedMemoryDataConsumerHandle thread-safe. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ipc-data-consumer
Patch Set: rebase Created 5 years, 6 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 | « content/public/child/fixed_received_data.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_PUBLIC_CHILD_REQUEST_PEER_H_ 5 #ifndef CONTENT_PUBLIC_CHILD_REQUEST_PEER_H_
6 #define CONTENT_PUBLIC_CHILD_REQUEST_PEER_H_ 6 #define CONTENT_PUBLIC_CHILD_REQUEST_PEER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 public: 45 public:
46 virtual ~ReceivedData() {} 46 virtual ~ReceivedData() {}
47 virtual const char* payload() const = 0; 47 virtual const char* payload() const = 0;
48 virtual int length() const = 0; 48 virtual int length() const = 0;
49 // The encoded_length is the length of the encoded data transferred 49 // The encoded_length is the length of the encoded data transferred
50 // over the network, which could be different from data length (e.g. for 50 // over the network, which could be different from data length (e.g. for
51 // gzipped content). 51 // gzipped content).
52 virtual int encoded_length() const = 0; 52 virtual int encoded_length() const = 0;
53 }; 53 };
54 54
55 // A ThreadSafeReceivedData can be deleted on ANY thread.
56 class CONTENT_EXPORT ThreadSafeReceivedData : public ReceivedData {};
57
55 // Called as upload progress is made. 58 // Called as upload progress is made.
56 // note: only for requests with upload progress enabled. 59 // note: only for requests with upload progress enabled.
57 virtual void OnUploadProgress(uint64 position, uint64 size) = 0; 60 virtual void OnUploadProgress(uint64 position, uint64 size) = 0;
58 61
59 // Called when a redirect occurs. The implementation may return false to 62 // Called when a redirect occurs. The implementation may return false to
60 // suppress the redirect. The ResourceResponseInfo provides information about 63 // suppress the redirect. The ResourceResponseInfo provides information about
61 // the redirect response and the RedirectInfo includes information about the 64 // the redirect response and the RedirectInfo includes information about the
62 // request to be made if the method returns true. 65 // request to be made if the method returns true.
63 virtual bool OnReceivedRedirect(const net::RedirectInfo& redirect_info, 66 virtual bool OnReceivedRedirect(const net::RedirectInfo& redirect_info,
64 const ResourceResponseInfo& info) = 0; 67 const ResourceResponseInfo& info) = 0;
(...skipping 28 matching lines...) Expand all
93 const base::TimeTicks& completion_time, 96 const base::TimeTicks& completion_time,
94 int64 total_transfer_size) = 0; 97 int64 total_transfer_size) = 0;
95 98
96 protected: 99 protected:
97 virtual ~RequestPeer() {} 100 virtual ~RequestPeer() {}
98 }; 101 };
99 102
100 } // namespace content 103 } // namespace content
101 104
102 #endif // CONTENT_PUBLIC_CHILD_REQUEST_PEER_H_ 105 #endif // CONTENT_PUBLIC_CHILD_REQUEST_PEER_H_
OLDNEW
« no previous file with comments | « content/public/child/fixed_received_data.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698