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

Unified Diff: courgette/courgette_tool.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/bsdiff_memory_unittest.cc ('k') | courgette/simple_delta.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: courgette/courgette_tool.cc
diff --git a/courgette/courgette_tool.cc b/courgette/courgette_tool.cc
index d667f91eb6b549169b0631477e345b0faa2d3d9e..70b177b817c40b269a8fa7215f65131cfe634367 100644
--- a/courgette/courgette_tool.cc
+++ b/courgette/courgette_tool.cc
@@ -277,9 +277,10 @@ void DisassembleAdjustDiff(const base::FilePath& model_file,
old_source.Init(old_stream ? *old_stream : empty_sink);
new_source.Init(new_stream ? *new_stream : empty_sink);
courgette::SinkStream patch_stream;
- courgette::BSDiffStatus status =
- courgette::CreateBinaryPatch(&old_source, &new_source, &patch_stream);
- if (status != courgette::OK) Problem("-xxx failed.");
+ bsdiff::BSDiffStatus status =
+ bsdiff::CreateBinaryPatch(&old_source, &new_source, &patch_stream);
+ if (status != bsdiff::OK)
+ Problem("-xxx failed.");
std::string append = std::string("-") + base::IntToString(i);
@@ -327,7 +328,8 @@ void GenerateEnsemblePatch(const base::FilePath& old_file,
courgette::Status status =
courgette::GenerateEnsemblePatch(&old_stream, &new_stream, &patch_stream);
- if (status != courgette::C_OK) Problem("-gen failed.");
+ if (status != courgette::C_OK)
+ Problem("-gen failed.");
WriteSinkToFile(&patch_stream, patch_file);
}
@@ -398,10 +400,11 @@ void GenerateBSDiffPatch(const base::FilePath& old_file,
new_stream.Init(new_buffer.data(), new_buffer.length());
courgette::SinkStream patch_stream;
- courgette::BSDiffStatus status =
- courgette::CreateBinaryPatch(&old_stream, &new_stream, &patch_stream);
+ bsdiff::BSDiffStatus status =
+ bsdiff::CreateBinaryPatch(&old_stream, &new_stream, &patch_stream);
- if (status != courgette::OK) Problem("-genbsdiff failed.");
+ if (status != bsdiff::OK)
+ Problem("-genbsdiff failed.");
WriteSinkToFile(&patch_stream, patch_file);
}
@@ -418,10 +421,11 @@ void ApplyBSDiffPatch(const base::FilePath& old_file,
patch_stream.Init(patch_buffer.data(), patch_buffer.length());
courgette::SinkStream new_stream;
- courgette::BSDiffStatus status =
- courgette::ApplyBinaryPatch(&old_stream, &patch_stream, &new_stream);
+ bsdiff::BSDiffStatus status =
+ bsdiff::ApplyBinaryPatch(&old_stream, &patch_stream, &new_stream);
- if (status != courgette::OK) Problem("-applybsdiff failed.");
+ if (status != bsdiff::OK)
+ Problem("-applybsdiff failed.");
WriteSinkToFile(&new_stream, new_file);
}
« no previous file with comments | « courgette/bsdiff_memory_unittest.cc ('k') | courgette/simple_delta.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698