| 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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 } | 255 } |
| 256 #endif // defined(OS_CHROMEOS) | 256 #endif // defined(OS_CHROMEOS) |
| 257 | 257 |
| 258 void ChromeContentUtilityClient::OnPatchFileBsdiff( | 258 void ChromeContentUtilityClient::OnPatchFileBsdiff( |
| 259 const base::FilePath& input_file, | 259 const base::FilePath& input_file, |
| 260 const base::FilePath& patch_file, | 260 const base::FilePath& patch_file, |
| 261 const base::FilePath& output_file) { | 261 const base::FilePath& output_file) { |
| 262 if (input_file.empty() || patch_file.empty() || output_file.empty()) { | 262 if (input_file.empty() || patch_file.empty() || output_file.empty()) { |
| 263 Send(new ChromeUtilityHostMsg_PatchFile_Finished(-1)); | 263 Send(new ChromeUtilityHostMsg_PatchFile_Finished(-1)); |
| 264 } else { | 264 } else { |
| 265 const int patch_status = courgette::ApplyBinaryPatch(input_file, | 265 const int patch_status = bsdiff::ApplyBinaryPatch(input_file, |
| 266 patch_file, | 266 patch_file, |
| 267 output_file); | 267 output_file); |
| 268 Send(new ChromeUtilityHostMsg_PatchFile_Finished(patch_status)); | 268 Send(new ChromeUtilityHostMsg_PatchFile_Finished(patch_status)); |
| 269 } | 269 } |
| 270 ReleaseProcessIfNeeded(); | 270 ReleaseProcessIfNeeded(); |
| 271 } | 271 } |
| 272 | 272 |
| 273 void ChromeContentUtilityClient::OnPatchFileCourgette( | 273 void ChromeContentUtilityClient::OnPatchFileCourgette( |
| 274 const base::FilePath& input_file, | 274 const base::FilePath& input_file, |
| 275 const base::FilePath& patch_file, | 275 const base::FilePath& patch_file, |
| 276 const base::FilePath& output_file) { | 276 const base::FilePath& output_file) { |
| 277 if (input_file.empty() || patch_file.empty() || output_file.empty()) { | 277 if (input_file.empty() || patch_file.empty() || output_file.empty()) { |
| (...skipping 27 matching lines...) Expand all Loading... |
| 305 safe_browsing::zip_analyzer::Results results; | 305 safe_browsing::zip_analyzer::Results results; |
| 306 safe_browsing::dmg::AnalyzeDMGFile( | 306 safe_browsing::dmg::AnalyzeDMGFile( |
| 307 IPC::PlatformFileForTransitToFile(dmg_file), &results); | 307 IPC::PlatformFileForTransitToFile(dmg_file), &results); |
| 308 Send(new ChromeUtilityHostMsg_AnalyzeDmgFileForDownloadProtection_Finished( | 308 Send(new ChromeUtilityHostMsg_AnalyzeDmgFileForDownloadProtection_Finished( |
| 309 results)); | 309 results)); |
| 310 ReleaseProcessIfNeeded(); | 310 ReleaseProcessIfNeeded(); |
| 311 } | 311 } |
| 312 #endif // defined(OS_MACOSX) | 312 #endif // defined(OS_MACOSX) |
| 313 | 313 |
| 314 #endif // defined(FULL_SAFE_BROWSING) | 314 #endif // defined(FULL_SAFE_BROWSING) |
| OLD | NEW |