OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/component_updater/component_patcher_operation.h" | 5 #include "chrome/browser/component_updater/component_patcher_operation.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 | 143 |
144 patch_abs_path_ = input_dir.Append( | 144 patch_abs_path_ = input_dir.Append( |
145 base::FilePath::FromUTF8Unsafe(patch_rel_path)); | 145 base::FilePath::FromUTF8Unsafe(patch_rel_path)); |
146 | 146 |
147 return ComponentUnpacker::kNone; | 147 return ComponentUnpacker::kNone; |
148 } | 148 } |
149 | 149 |
150 ComponentUnpacker::Error DeltaUpdateOpCreate::DoRun(ComponentPatcher*, | 150 ComponentUnpacker::Error DeltaUpdateOpCreate::DoRun(ComponentPatcher*, |
151 int* error) { | 151 int* error) { |
152 *error = 0; | 152 *error = 0; |
153 if (!file_util::Move(patch_abs_path_, output_abs_path_)) | 153 if (!base::Move(patch_abs_path_, output_abs_path_)) |
154 return ComponentUnpacker::kDeltaOperationFailure; | 154 return ComponentUnpacker::kDeltaOperationFailure; |
155 | 155 |
156 return ComponentUnpacker::kNone; | 156 return ComponentUnpacker::kNone; |
157 } | 157 } |
158 | 158 |
159 DeltaUpdateOpPatchBsdiff::DeltaUpdateOpPatchBsdiff() {} | 159 DeltaUpdateOpPatchBsdiff::DeltaUpdateOpPatchBsdiff() {} |
160 | 160 |
161 ComponentUnpacker::Error DeltaUpdateOpPatchBsdiff::DoParseArguments( | 161 ComponentUnpacker::Error DeltaUpdateOpPatchBsdiff::DoParseArguments( |
162 base::DictionaryValue* command_args, | 162 base::DictionaryValue* command_args, |
163 const base::FilePath& input_dir, | 163 const base::FilePath& input_dir, |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 ComponentPatcher* patcher, | 213 ComponentPatcher* patcher, |
214 int* error) { | 214 int* error) { |
215 *error = 0; | 215 *error = 0; |
216 return patcher->Patch(ComponentPatcher::kPatchTypeCourgette, | 216 return patcher->Patch(ComponentPatcher::kPatchTypeCourgette, |
217 input_abs_path_, | 217 input_abs_path_, |
218 patch_abs_path_, | 218 patch_abs_path_, |
219 output_abs_path_, | 219 output_abs_path_, |
220 error); | 220 error); |
221 } | 221 } |
222 | 222 |
OLD | NEW |