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

Side by Side Diff: webkit/glue/plugins/pepper_url_loader.cc

Issue 2994004: Fix some uninitialize variables that caused the URLLoader test to... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 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 | Annotate | Revision Log
« no previous file with comments | « chrome/test/ui/ppapi_uitest.cc ('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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #include "webkit/glue/plugins/pepper_url_loader.h" 5 #include "webkit/glue/plugins/pepper_url_loader.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "third_party/ppapi/c/pp_completion_callback.h" 8 #include "third_party/ppapi/c/pp_completion_callback.h"
9 #include "third_party/ppapi/c/pp_errors.h" 9 #include "third_party/ppapi/c/pp_errors.h"
10 #include "third_party/ppapi/c/ppb_url_loader.h" 10 #include "third_party/ppapi/c/ppb_url_loader.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 144
145 } // namespace 145 } // namespace
146 146
147 URLLoader::URLLoader(PluginInstance* instance) 147 URLLoader::URLLoader(PluginInstance* instance)
148 : Resource(instance->module()), 148 : Resource(instance->module()),
149 instance_(instance), 149 instance_(instance),
150 pending_callback_(), 150 pending_callback_(),
151 bytes_sent_(0), 151 bytes_sent_(0),
152 total_bytes_to_be_sent_(0), 152 total_bytes_to_be_sent_(0),
153 bytes_received_(0), 153 bytes_received_(0),
154 total_bytes_to_be_received_(0) { 154 total_bytes_to_be_received_(0),
155 user_buffer_(NULL),
156 user_buffer_size_(0) {
155 } 157 }
156 158
157 URLLoader::~URLLoader() { 159 URLLoader::~URLLoader() {
158 } 160 }
159 161
160 // static 162 // static
161 const PPB_URLLoader* URLLoader::GetInterface() { 163 const PPB_URLLoader* URLLoader::GetInterface() {
162 return &ppb_urlloader; 164 return &ppb_urlloader;
163 } 165 }
164 166
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 std::copy(buffer_.begin(), buffer_.begin() + bytes_to_copy, user_buffer_); 283 std::copy(buffer_.begin(), buffer_.begin() + bytes_to_copy, user_buffer_);
282 buffer_.erase(buffer_.begin(), buffer_.begin() + bytes_to_copy); 284 buffer_.erase(buffer_.begin(), buffer_.begin() + bytes_to_copy);
283 285
284 // Reset for next time. 286 // Reset for next time.
285 user_buffer_ = NULL; 287 user_buffer_ = NULL;
286 user_buffer_size_ = 0; 288 user_buffer_size_ = 0;
287 return bytes_to_copy; 289 return bytes_to_copy;
288 } 290 }
289 291
290 } // namespace pepper 292 } // namespace pepper
OLDNEW
« no previous file with comments | « chrome/test/ui/ppapi_uitest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698