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

Unified Diff: net/disk_cache/simple/simple_disk_format.cc

Issue 13839011: Asynchronous initialization in Simple Index. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/disk_cache/simple/simple_disk_format.h ('k') | net/disk_cache/simple/simple_index.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/simple/simple_disk_format.cc
diff --git a/net/disk_cache/simple/simple_disk_format.cc b/net/disk_cache/simple/simple_disk_format.cc
index 0a254dd30a38ce311bef5ef9d9c6dc9f4bf4b4c1..a29600423eca7ce433ce1cf279c0ca45c91aacd0 100644
--- a/net/disk_cache/simple/simple_disk_format.cc
+++ b/net/disk_cache/simple/simple_disk_format.cc
@@ -71,6 +71,15 @@ void EntryMetadata::DeSerialize(const char* in_buffer,
memcpy(out_entry_metadata, in_buffer, kEntryMetadataSize);
}
+// static
+void EntryMetadata::Merge(const EntryMetadata& from,
+ EntryMetadata* to) {
+ if (to->last_used_time == 0)
+ to->last_used_time = from.last_used_time;
+ if (to->entry_size == 0)
+ to->entry_size = from.entry_size;
+}
+
} // namespace SimpleIndexFile
} // namespace disk_cache
« no previous file with comments | « net/disk_cache/simple/simple_disk_format.h ('k') | net/disk_cache/simple/simple_index.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698