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

Side by Side Diff: net/disk_cache/sparse_control.cc

Issue 10833013: Coverity: Initialize member variables. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Build fix. Created 8 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "net/disk_cache/sparse_control.h" 5 #include "net/disk_cache/sparse_control.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/format_macros.h" 8 #include "base/format_macros.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 } 181 }
182 182
183 } // namespace. 183 } // namespace.
184 184
185 namespace disk_cache { 185 namespace disk_cache {
186 186
187 SparseControl::SparseControl(EntryImpl* entry) 187 SparseControl::SparseControl(EntryImpl* entry)
188 : entry_(entry), 188 : entry_(entry),
189 child_(NULL), 189 child_(NULL),
190 operation_(kNoOperation), 190 operation_(kNoOperation),
191 pending_(false),
192 finished_(false),
191 init_(false), 193 init_(false),
192 child_map_(child_data_.bitmap, kNumSparseBits, kNumSparseBits / 32) { 194 range_found_(false),
195 abort_(false),
196 child_map_(child_data_.bitmap, kNumSparseBits, kNumSparseBits / 32),
197 offset_(0),
198 buf_len_(0),
199 child_offset_(0),
200 child_len_(0),
201 result_(0) {
202 memset(&sparse_header_, 0, sizeof(sparse_header_));
203 memset(&child_data_, 0, sizeof(child_data_));
193 } 204 }
194 205
195 SparseControl::~SparseControl() { 206 SparseControl::~SparseControl() {
196 if (child_) 207 if (child_)
197 CloseChild(); 208 CloseChild();
198 if (init_) 209 if (init_)
199 WriteSparseData(); 210 WriteSparseData();
200 } 211 }
201 212
202 int SparseControl::Init() { 213 int SparseControl::Init() {
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after
864 CompletionCallback cb = abort_callbacks_[i]; 875 CompletionCallback cb = abort_callbacks_[i];
865 if (i == abort_callbacks_.size() - 1) 876 if (i == abort_callbacks_.size() - 1)
866 abort_callbacks_.clear(); 877 abort_callbacks_.clear();
867 878
868 entry_->Release(); // Don't touch object after this line. 879 entry_->Release(); // Don't touch object after this line.
869 cb.Run(net::OK); 880 cb.Run(net::OK);
870 } 881 }
871 } 882 }
872 883
873 } // namespace disk_cache 884 } // namespace disk_cache
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_view_win.h ('k') | net/socket/ssl_server_socket_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698