| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 "content/browser/child_process_launcher_helper.h" | 5 #include "content/browser/child_process_launcher_helper.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/android/apk_assets.h" | 9 #include "base/android/apk_assets.h" |
| 10 #include "base/i18n/icu_util.h" | 10 #include "base/i18n/icu_util.h" |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 } | 163 } |
| 164 | 164 |
| 165 // static | 165 // static |
| 166 void ChildProcessLauncherHelper::SetRegisteredFilesForService( | 166 void ChildProcessLauncherHelper::SetRegisteredFilesForService( |
| 167 const std::string& service_name, | 167 const std::string& service_name, |
| 168 catalog::RequiredFileMap required_files) { | 168 catalog::RequiredFileMap required_files) { |
| 169 SetFilesToShareForServicePosix(service_name, std::move(required_files)); | 169 SetFilesToShareForServicePosix(service_name, std::move(required_files)); |
| 170 } | 170 } |
| 171 | 171 |
| 172 // static | 172 // static |
| 173 void ChildProcessLauncherHelper::ResetRegisteredFilesForTesting() { |
| 174 ResetFilesToShareForTestingPosix(); |
| 175 } |
| 176 |
| 177 // static |
| 173 base::File OpenFileToShare(const base::FilePath& path, | 178 base::File OpenFileToShare(const base::FilePath& path, |
| 174 base::MemoryMappedFile::Region* region) { | 179 base::MemoryMappedFile::Region* region) { |
| 175 return base::File(base::android::OpenApkAsset(path.value(), region)); | 180 return base::File(base::android::OpenApkAsset(path.value(), region)); |
| 176 } | 181 } |
| 177 | 182 |
| 178 } // namespace internal | 183 } // namespace internal |
| 179 } // namespace content | 184 } // namespace content |
| OLD | NEW |