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

Side by Side Diff: components/update_client/component_patcher_operation.cc

Issue 2873513002: Fix dependencies on OutOfProcessPatcher. (Closed)
Patch Set: base namespace fix Created 3 years, 7 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/update_client/component_patcher_operation.h" 5 #include "components/update_client/component_patcher_operation.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/files/file_util.h" 11 #include "base/files/file_util.h"
12 #include "base/files/memory_mapped_file.h" 12 #include "base/files/memory_mapped_file.h"
13 #include "base/location.h" 13 #include "base/location.h"
14 #include "base/strings/string_number_conversions.h" 14 #include "base/strings/string_number_conversions.h"
15 #include "components/update_client/out_of_process_patcher.h"
15 #include "components/update_client/update_client.h" 16 #include "components/update_client/update_client.h"
16 #include "components/update_client/update_client_errors.h" 17 #include "components/update_client/update_client_errors.h"
17 #include "components/update_client/utils.h" 18 #include "components/update_client/utils.h"
18 #include "courgette/courgette.h" 19 #include "courgette/courgette.h"
19 #include "courgette/third_party/bsdiff/bsdiff.h" 20 #include "courgette/third_party/bsdiff/bsdiff.h"
20 21
21 namespace update_client { 22 namespace update_client {
22 23
23 namespace { 24 namespace {
24 25
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 163
163 void DeltaUpdateOpCreate::DoRun(const ComponentPatcher::Callback& callback) { 164 void DeltaUpdateOpCreate::DoRun(const ComponentPatcher::Callback& callback) {
164 if (!base::Move(patch_abs_path_, output_abs_path_)) 165 if (!base::Move(patch_abs_path_, output_abs_path_))
165 callback.Run(UnpackerError::kDeltaOperationFailure, 0); 166 callback.Run(UnpackerError::kDeltaOperationFailure, 0);
166 else 167 else
167 callback.Run(UnpackerError::kNone, 0); 168 callback.Run(UnpackerError::kNone, 0);
168 } 169 }
169 170
170 DeltaUpdateOpPatch::DeltaUpdateOpPatch( 171 DeltaUpdateOpPatch::DeltaUpdateOpPatch(
171 const std::string& operation, 172 const std::string& operation,
172 scoped_refptr<OutOfProcessPatcher> out_of_process_patcher) 173 const scoped_refptr<OutOfProcessPatcher>& out_of_process_patcher)
173 : operation_(operation), out_of_process_patcher_(out_of_process_patcher) { 174 : operation_(operation), out_of_process_patcher_(out_of_process_patcher) {
174 DCHECK(operation == kBsdiff || operation == kCourgette); 175 DCHECK(operation == kBsdiff || operation == kCourgette);
175 } 176 }
176 177
177 DeltaUpdateOpPatch::~DeltaUpdateOpPatch() { 178 DeltaUpdateOpPatch::~DeltaUpdateOpPatch() {
178 } 179 }
179 180
180 UnpackerError DeltaUpdateOpPatch::DoParseArguments( 181 UnpackerError DeltaUpdateOpPatch::DoParseArguments(
181 const base::DictionaryValue* command_args, 182 const base::DictionaryValue* command_args,
182 const base::FilePath& input_dir, 183 const base::FilePath& input_dir,
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 } else { 236 } else {
236 callback.Run(UnpackerError::kDeltaOperationFailure, 237 callback.Run(UnpackerError::kDeltaOperationFailure,
237 result + kCourgetteErrorOffset); 238 result + kCourgetteErrorOffset);
238 } 239 }
239 } else { 240 } else {
240 NOTREACHED(); 241 NOTREACHED();
241 } 242 }
242 } 243 }
243 244
244 } // namespace update_client 245 } // namespace update_client
OLDNEW
« no previous file with comments | « components/update_client/component_patcher_operation.h ('k') | components/update_client/component_unpacker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698