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

Unified Diff: net/disk_cache/backend_impl.cc

Issue 17507006: Disk cache v3 ref2 Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Incl IndexTable cl Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/disk_cache/addr.cc ('k') | net/disk_cache/backend_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/backend_impl.cc
===================================================================
--- net/disk_cache/backend_impl.cc (revision 232523)
+++ net/disk_cache/backend_impl.cc (working copy)
@@ -284,7 +284,7 @@
bool previous_crash = (data_->header.crash != 0);
data_->header.crash = 1;
- if (!block_files_.Init(create_files))
+ if (!block_files_.Init(create_files, kFirstAdditionalBlockFile))
return net::ERR_FAILED;
// We want to minimize the changes to cache for an AppCache.
@@ -1144,7 +1144,7 @@
}
void BackendImpl::FlushIndex() {
- if (index_.get() && !disabled_)
+ if (index_ && !disabled_)
index_->Flush();
}
@@ -1155,7 +1155,7 @@
}
int32 BackendImpl::GetEntryCount() const {
- if (!index_.get() || disabled_)
+ if (!index_ || disabled_)
return 0;
// num_entries includes entries already evicted.
int32 not_deleted = data_->header.num_entries -
@@ -1574,7 +1574,7 @@
if (!error)
child.set_value(cache_entry->GetNextAddress());
- if (parent_entry.get()) {
+ if (parent_entry) {
parent_entry->SetNextAddress(child);
parent_entry = NULL;
} else {
@@ -1615,21 +1615,21 @@
cache_entry = NULL;
parent_entry = cache_entry;
cache_entry = NULL;
- if (!parent_entry.get())
+ if (!parent_entry)
break;
address.set_value(parent_entry->GetNextAddress());
}
- if (parent_entry.get() && (!find_parent || !found))
+ if (parent_entry && (!find_parent || !found))
parent_entry = NULL;
- if (find_parent && entry_addr.is_initialized() && !cache_entry.get()) {
+ if (find_parent && entry_addr.is_initialized() && !cache_entry) {
*match_error = true;
parent_entry = NULL;
}
- if (cache_entry.get() && (find_parent || !found))
+ if (cache_entry && (find_parent || !found))
cache_entry = NULL;
find_parent ? parent_entry.swap(&tmp) : cache_entry.swap(&tmp);
« no previous file with comments | « net/disk_cache/addr.cc ('k') | net/disk_cache/backend_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698