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

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

Issue 3814013: FBTF: Monster ctor patch after changing heuristics in clang plugin. (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: More add file fail Created 10 years, 2 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 | « net/disk_cache/sparse_control.h ('k') | net/ftp/ftp_ctrl_response_buffer.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 // Copyright (c) 2009-2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009-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 "net/disk_cache/sparse_control.h" 5 #include "net/disk_cache/sparse_control.h"
6 6
7 #include "base/format_macros.h" 7 #include "base/format_macros.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 135
136 // Post a task to delete the next child. 136 // Post a task to delete the next child.
137 MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod( 137 MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod(
138 this, &ChildrenDeleter::DeleteChildren)); 138 this, &ChildrenDeleter::DeleteChildren));
139 } 139 }
140 140
141 } // namespace. 141 } // namespace.
142 142
143 namespace disk_cache { 143 namespace disk_cache {
144 144
145 SparseControl::SparseControl(EntryImpl* entry)
146 : entry_(entry),
147 child_(NULL),
148 operation_(kNoOperation),
149 init_(false),
150 child_map_(child_data_.bitmap, kNumSparseBits, kNumSparseBits / 32),
151 ALLOW_THIS_IN_INITIALIZER_LIST(
152 child_callback_(this, &SparseControl::OnChildIOCompleted)),
153 user_callback_(NULL) {
154 }
155
145 SparseControl::~SparseControl() { 156 SparseControl::~SparseControl() {
146 if (child_) 157 if (child_)
147 CloseChild(); 158 CloseChild();
148 if (init_) 159 if (init_)
149 WriteSparseData(); 160 WriteSparseData();
150 } 161 }
151 162
152 int SparseControl::Init() { 163 int SparseControl::Init() {
153 DCHECK(!init_); 164 DCHECK(!init_);
154 165
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 net::CompletionCallback* c = abort_callbacks_[i]; 764 net::CompletionCallback* c = abort_callbacks_[i];
754 if (i == abort_callbacks_.size() - 1) 765 if (i == abort_callbacks_.size() - 1)
755 abort_callbacks_.clear(); 766 abort_callbacks_.clear();
756 767
757 entry_->Release(); // Don't touch object after this line. 768 entry_->Release(); // Don't touch object after this line.
758 c->Run(net::OK); 769 c->Run(net::OK);
759 } 770 }
760 } 771 }
761 772
762 } // namespace disk_cache 773 } // namespace disk_cache
OLDNEW
« no previous file with comments | « net/disk_cache/sparse_control.h ('k') | net/ftp/ftp_ctrl_response_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698