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

Unified Diff: courgette/simple_delta.cc

Issue 2031193002: [Courgette] Refactor BSDiff namespaces and bsdiff::search() interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync. Created 4 years, 5 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 | « courgette/courgette_tool.cc ('k') | courgette/third_party/bsdiff/README.chromium » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: courgette/simple_delta.cc
diff --git a/courgette/simple_delta.cc b/courgette/simple_delta.cc
index ed7eaa0ebcedddeb31daab150e59fb49f48a7243..d6f2cb459d5510bdc52585ad4592728af153d496 100644
--- a/courgette/simple_delta.cc
+++ b/courgette/simple_delta.cc
@@ -15,10 +15,10 @@ namespace courgette {
namespace {
-Status BSDiffStatusToStatus(BSDiffStatus status) {
+Status BSDiffStatusToStatus(bsdiff::BSDiffStatus status) {
switch (status) {
- case OK: return C_OK;
- case CRC_ERROR: return C_BINARY_DIFF_CRC_ERROR;
+ case bsdiff::OK: return C_OK;
+ case bsdiff::CRC_ERROR: return C_BINARY_DIFF_CRC_ERROR;
default: return C_GENERAL_ERROR;
}
}
@@ -27,14 +27,14 @@ Status BSDiffStatusToStatus(BSDiffStatus status) {
Status ApplySimpleDelta(SourceStream* old, SourceStream* delta,
SinkStream* target) {
- return BSDiffStatusToStatus(ApplyBinaryPatch(old, delta, target));
+ return BSDiffStatusToStatus(bsdiff::ApplyBinaryPatch(old, delta, target));
}
Status GenerateSimpleDelta(SourceStream* old, SourceStream* target,
SinkStream* delta) {
VLOG(1) << "GenerateSimpleDelta " << old->Remaining()
<< " " << target->Remaining();
- return BSDiffStatusToStatus(CreateBinaryPatch(old, target, delta));
+ return BSDiffStatusToStatus(bsdiff::CreateBinaryPatch(old, target, delta));
}
} // namespace courgette
« no previous file with comments | « courgette/courgette_tool.cc ('k') | courgette/third_party/bsdiff/README.chromium » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698