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

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: egor's change is in 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
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..d9379a6f5a8c161cb9814f784ea3c0128ede222e 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& entry_metadata,
pasko-google - do not use 2013/04/10 17:51:01 I would have just called the parameters: from, to
felipeg 2013/04/11 09:41:35 Done.
gavinp 2013/04/11 09:56:32 +1
+ EntryMetadata* out_entry_metadata) {
+ if (out_entry_metadata->last_used_time == 0)
+ out_entry_metadata->last_used_time = entry_metadata.last_used_time;
+ if (out_entry_metadata->entry_size == 0)
+ out_entry_metadata->entry_size = entry_metadata.entry_size;
+}
+
} // namespace SimpleIndexFile
} // namespace disk_cache

Powered by Google App Engine
This is Rietveld 408576698