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

Side by Side Diff: ppapi/proxy/url_loader_resource.h

Issue 915403003: Enable size_t to int truncation warnings in PPAPI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 PPAPI_PROXY_URL_LOADER_RESOURCE_H_ 5 #ifndef PPAPI_PROXY_URL_LOADER_RESOURCE_H_
6 #define PPAPI_PROXY_URL_LOADER_RESOURCE_H_ 6 #define PPAPI_PROXY_URL_LOADER_RESOURCE_H_
7 7
8 #include <deque> 8 #include <deque>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 // Sets up |callback| as the pending callback. This should only be called once 107 // Sets up |callback| as the pending callback. This should only be called once
108 // it is certain that |PP_OK_COMPLETIONPENDING| will be returned. 108 // it is certain that |PP_OK_COMPLETIONPENDING| will be returned.
109 void RegisterCallback(scoped_refptr<TrackedCallback> callback); 109 void RegisterCallback(scoped_refptr<TrackedCallback> callback);
110 110
111 void RunCallback(int32_t result); 111 void RunCallback(int32_t result);
112 112
113 // Saves the given response info to response_info_, handling file refs if 113 // Saves the given response info to response_info_, handling file refs if
114 // necessary. This does not issue any callbacks. 114 // necessary. This does not issue any callbacks.
115 void SaveResponseInfo(const URLResponseInfoData& data); 115 void SaveResponseInfo(const URLResponseInfoData& data);
116 116
117 size_t FillUserBuffer(); 117 int32_t FillUserBuffer();
118 118
119 Mode mode_; 119 Mode mode_;
120 URLRequestInfoData request_data_; 120 URLRequestInfoData request_data_;
121 121
122 scoped_refptr<TrackedCallback> pending_callback_; 122 scoped_refptr<TrackedCallback> pending_callback_;
123 123
124 PP_URLLoaderTrusted_StatusCallback status_callback_; 124 PP_URLLoaderTrusted_StatusCallback status_callback_;
125 125
126 std::deque<char> buffer_; 126 std::deque<char> buffer_;
127 int64_t bytes_sent_; 127 int64_t bytes_sent_;
128 int64_t total_bytes_to_be_sent_; 128 int64_t total_bytes_to_be_sent_;
129 int64_t bytes_received_; 129 int64_t bytes_received_;
130 int64_t total_bytes_to_be_received_; 130 int64_t total_bytes_to_be_received_;
131 char* user_buffer_; 131 char* user_buffer_;
132 size_t user_buffer_size_; 132 size_t user_buffer_size_;
133 int32_t done_status_; 133 int32_t done_status_;
134 bool is_streaming_to_file_; 134 bool is_streaming_to_file_;
135 bool is_asynchronous_load_suspended_; 135 bool is_asynchronous_load_suspended_;
136 136
137 // The response info if we've received it. 137 // The response info if we've received it.
138 scoped_refptr<URLResponseInfoResource> response_info_; 138 scoped_refptr<URLResponseInfoResource> response_info_;
139 139
140 DISALLOW_COPY_AND_ASSIGN(URLLoaderResource); 140 DISALLOW_COPY_AND_ASSIGN(URLLoaderResource);
141 }; 141 };
142 142
143 } // namespace proxy 143 } // namespace proxy
144 } // namespace ppapi 144 } // namespace ppapi
145 145
146 #endif // PPAPI_PROXY_URL_LOADER_RESOURCE_H_ 146 #endif // PPAPI_PROXY_URL_LOADER_RESOURCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698