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

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

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/mem_backend_impl.cc ('k') | net/disk_cache/sparse_control.cc » ('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 #ifndef NET_DISK_CACHE_SPARSE_CONTROL_H_ 5 #ifndef NET_DISK_CACHE_SPARSE_CONTROL_H_
6 #define NET_DISK_CACHE_SPARSE_CONTROL_H_ 6 #define NET_DISK_CACHE_SPARSE_CONTROL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 22 matching lines...) Expand all
33 class SparseControl { 33 class SparseControl {
34 public: 34 public:
35 // The operation to perform. 35 // The operation to perform.
36 enum SparseOperation { 36 enum SparseOperation {
37 kNoOperation, 37 kNoOperation,
38 kReadOperation, 38 kReadOperation,
39 kWriteOperation, 39 kWriteOperation,
40 kGetRangeOperation 40 kGetRangeOperation
41 }; 41 };
42 42
43 explicit SparseControl(EntryImpl* entry) 43 explicit SparseControl(EntryImpl* entry);
44 : entry_(entry), child_(NULL), operation_(kNoOperation), init_(false),
45 child_map_(child_data_.bitmap, kNumSparseBits, kNumSparseBits / 32),
46 ALLOW_THIS_IN_INITIALIZER_LIST(
47 child_callback_(this, &SparseControl::OnChildIOCompleted)),
48 user_callback_(NULL) {}
49 ~SparseControl(); 44 ~SparseControl();
50 45
51 // Initializes the object for the current entry. If this entry already stores 46 // Initializes the object for the current entry. If this entry already stores
52 // sparse data, or can be used to do it, it updates the relevant information 47 // sparse data, or can be used to do it, it updates the relevant information
53 // on disk and returns net::OK. Otherwise it returns a net error code. 48 // on disk and returns net::OK. Otherwise it returns a net error code.
54 int Init(); 49 int Init();
55 50
56 // Performs a quick test to see if the entry is sparse or not, without 51 // Performs a quick test to see if the entry is sparse or not, without
57 // generating disk IO (so the answer provided is only a best effort). 52 // generating disk IO (so the answer provided is only a best effort).
58 bool CouldBeSparse() const; 53 bool CouldBeSparse() const;
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 int child_offset_; // Offset to use for the current child. 168 int child_offset_; // Offset to use for the current child.
174 int child_len_; // Bytes to read or write for this child. 169 int child_len_; // Bytes to read or write for this child.
175 int result_; 170 int result_;
176 171
177 DISALLOW_COPY_AND_ASSIGN(SparseControl); 172 DISALLOW_COPY_AND_ASSIGN(SparseControl);
178 }; 173 };
179 174
180 } // namespace disk_cache 175 } // namespace disk_cache
181 176
182 #endif // NET_DISK_CACHE_SPARSE_CONTROL_H_ 177 #endif // NET_DISK_CACHE_SPARSE_CONTROL_H_
OLDNEW
« no previous file with comments | « net/disk_cache/mem_backend_impl.cc ('k') | net/disk_cache/sparse_control.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698