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

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

Issue 20378: Reduce the amount of included header files. Vast change like in "Oh God! This... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 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 | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "net/disk_cache/addr.h"
6
7 #include "base/logging.h"
8
9 namespace disk_cache {
10
11 int Addr::start_block() const {
12 DCHECK(is_block_file());
13 return value_ & kStartBlockMask;
14 }
15
16 int Addr::num_blocks() const {
17 DCHECK(is_block_file() || !value_);
18 return ((value_ & kNumBlocksMask) >> kNumBlocksOffset) + 1;
19 }
20
21 bool Addr::SetFileNumber(int file_number) {
22 DCHECK(is_separate_file());
23 if (file_number & ~kFileNameMask)
24 return false;
25 value_ = kInitializedMask | file_number;
26 return true;
27 }
28
29 } // namespace disk_cache
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698