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

Side by Side Diff: courgette/third_party/bsdiff/bsdiff_apply.cc

Issue 2187953003: [Courgette] Replace QSufSort with libdivsufsort. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix spacing. Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2003, 2004 Colin Percival 1 // Copyright 2003, 2004 Colin Percival
2 // All rights reserved 2 // All rights reserved
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted providing that the following conditions 5 // modification, are permitted providing that the following conditions
6 // are met: 6 // are met:
7 // 1. Redistributions of source code must retain the above copyright 7 // 1. Redistributions of source code must retain the above copyright
8 // notice, this list of conditions and the following disclaimer. 8 // notice, this list of conditions and the following disclaimer.
9 // 2. Redistributions in binary form must reproduce the above copyright 9 // 2. Redistributions in binary form must reproduce the above copyright
10 // notice, this list of conditions and the following disclaimer in the 10 // notice, this list of conditions and the following disclaimer in the
11 // documentation and/or other materials provided with the distribution. 11 // documentation and/or other materials provided with the distribution.
12 // 12 //
13 // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 13 // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
14 // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 14 // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
15 // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 15 // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 // ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 16 // ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
17 // DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 17 // DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 18 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 19 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 20 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
21 // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 21 // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22 // IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 22 // IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
23 // POSSIBILITY OF SUCH DAMAGE. 23 // POSSIBILITY OF SUCH DAMAGE.
24 // 24 //
25 // For the terms under which this work may be distributed, please see 25 // For the terms under which this work may be distributed, please see
26 // the adjoining file "LICENSE". 26 // the adjoining file "LICENSE".
27 // 27 //
28 // Changelog: 28 // ChangeLog:
29 // 2009-03-31 - Change to use Streams. Move CRC code to crc.{h,cc} 29 // 2009-03-31 - Change to use Streams. Move CRC code to crc.{h,cc}
30 // --Stephen Adams <sra@chromium.org> 30 // --Stephen Adams <sra@chromium.org>
31 // 2013-04-10 - Add wrapper method to apply a patch to files directly. 31 // 2013-04-10 - Add wrapper method to apply a patch to files directly.
32 // --Joshua Pawlicki <waffles@chromium.org> 32 // --Joshua Pawlicki <waffles@chromium.org>
33 33
34 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 34 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
35 // Use of this source code is governed by a BSD-style license that can be 35 // Use of this source code is governed by a BSD-style license that can be
36 // found in the LICENSE file. 36 // found in the LICENSE file.
37 37
38 #include "courgette/third_party/bsdiff/bsdiff.h" 38 #include "courgette/third_party/bsdiff/bsdiff.h"
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 // Write the stream to disk. 219 // Write the stream to disk.
220 int written = base::WriteFile( 220 int written = base::WriteFile(
221 new_file_path, reinterpret_cast<const char*>(new_sink_stream.Buffer()), 221 new_file_path, reinterpret_cast<const char*>(new_sink_stream.Buffer()),
222 static_cast<int>(new_sink_stream.Length())); 222 static_cast<int>(new_sink_stream.Length()));
223 if (written != static_cast<int>(new_sink_stream.Length())) 223 if (written != static_cast<int>(new_sink_stream.Length()))
224 return WRITE_ERROR; 224 return WRITE_ERROR;
225 return OK; 225 return OK;
226 } 226 }
227 227
228 } // namespace bsdiff 228 } // namespace bsdiff
OLDNEW
« no previous file with comments | « courgette/third_party/bsdiff/README.chromium ('k') | courgette/third_party/bsdiff/bsdiff_create.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698