| 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/test/test_installer.h" | 5 #include "chrome/browser/component_updater/test/test_installer.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/file_util.h" | |
| 10 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/files/file_util.h" |
| 11 #include "base/values.h" | 11 #include "base/values.h" |
| 12 | 12 |
| 13 namespace component_updater { | 13 namespace component_updater { |
| 14 | 14 |
| 15 TestInstaller::TestInstaller() : error_(0), install_count_(0) { | 15 TestInstaller::TestInstaller() : error_(0), install_count_(0) { |
| 16 } | 16 } |
| 17 | 17 |
| 18 void TestInstaller::OnUpdateError(int error) { | 18 void TestInstaller::OnUpdateError(int error) { |
| 19 error_ = error; | 19 error_ = error; |
| 20 } | 20 } |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 | 77 |
| 78 bool VersionedTestInstaller::GetInstalledFile(const std::string& file, | 78 bool VersionedTestInstaller::GetInstalledFile(const std::string& file, |
| 79 base::FilePath* installed_file) { | 79 base::FilePath* installed_file) { |
| 80 base::FilePath path; | 80 base::FilePath path; |
| 81 path = install_directory_.AppendASCII(current_version_.GetString()); | 81 path = install_directory_.AppendASCII(current_version_.GetString()); |
| 82 *installed_file = path.Append(base::FilePath::FromUTF8Unsafe(file)); | 82 *installed_file = path.Append(base::FilePath::FromUTF8Unsafe(file)); |
| 83 return true; | 83 return true; |
| 84 } | 84 } |
| 85 | 85 |
| 86 } // namespace component_updater | 86 } // namespace component_updater |
| OLD | NEW |