OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/utility/chrome_content_utility_client.h" | 5 #include "chrome/utility/chrome_content_utility_client.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 } | 259 } |
260 #endif // defined(OS_CHROMEOS) | 260 #endif // defined(OS_CHROMEOS) |
261 | 261 |
262 void ChromeContentUtilityClient::OnPatchFileBsdiff( | 262 void ChromeContentUtilityClient::OnPatchFileBsdiff( |
263 const base::FilePath& input_file, | 263 const base::FilePath& input_file, |
264 const base::FilePath& patch_file, | 264 const base::FilePath& patch_file, |
265 const base::FilePath& output_file) { | 265 const base::FilePath& output_file) { |
266 if (input_file.empty() || patch_file.empty() || output_file.empty()) { | 266 if (input_file.empty() || patch_file.empty() || output_file.empty()) { |
267 Send(new ChromeUtilityHostMsg_PatchFile_Finished(-1)); | 267 Send(new ChromeUtilityHostMsg_PatchFile_Finished(-1)); |
268 } else { | 268 } else { |
269 const int patch_status = courgette::ApplyBinaryPatch(input_file, | 269 const int patch_status = bsdiff::ApplyBinaryPatch(input_file, |
270 patch_file, | 270 patch_file, |
271 output_file); | 271 output_file); |
272 Send(new ChromeUtilityHostMsg_PatchFile_Finished(patch_status)); | 272 Send(new ChromeUtilityHostMsg_PatchFile_Finished(patch_status)); |
273 } | 273 } |
274 ReleaseProcessIfNeeded(); | 274 ReleaseProcessIfNeeded(); |
275 } | 275 } |
276 | 276 |
277 void ChromeContentUtilityClient::OnPatchFileCourgette( | 277 void ChromeContentUtilityClient::OnPatchFileCourgette( |
278 const base::FilePath& input_file, | 278 const base::FilePath& input_file, |
279 const base::FilePath& patch_file, | 279 const base::FilePath& patch_file, |
280 const base::FilePath& output_file) { | 280 const base::FilePath& output_file) { |
281 if (input_file.empty() || patch_file.empty() || output_file.empty()) { | 281 if (input_file.empty() || patch_file.empty() || output_file.empty()) { |
(...skipping 27 matching lines...) Expand all Loading... |
309 safe_browsing::zip_analyzer::Results results; | 309 safe_browsing::zip_analyzer::Results results; |
310 safe_browsing::dmg::AnalyzeDMGFile( | 310 safe_browsing::dmg::AnalyzeDMGFile( |
311 IPC::PlatformFileForTransitToFile(dmg_file), &results); | 311 IPC::PlatformFileForTransitToFile(dmg_file), &results); |
312 Send(new ChromeUtilityHostMsg_AnalyzeDmgFileForDownloadProtection_Finished( | 312 Send(new ChromeUtilityHostMsg_AnalyzeDmgFileForDownloadProtection_Finished( |
313 results)); | 313 results)); |
314 ReleaseProcessIfNeeded(); | 314 ReleaseProcessIfNeeded(); |
315 } | 315 } |
316 #endif // defined(OS_MACOSX) | 316 #endif // defined(OS_MACOSX) |
317 | 317 |
318 #endif // defined(FULL_SAFE_BROWSING) | 318 #endif // defined(FULL_SAFE_BROWSING) |
OLD | NEW |