| 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/file_util.h" | 6 #include "base/file_util.h" |
| 7 #include "base/files/file_enumerator.h" | 7 #include "base/files/file_enumerator.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "base/version.h" | 10 #include "base/version.h" |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 content::BrowserThread::UI, | 92 content::BrowserThread::UI, |
| 93 FROM_HERE, | 93 FROM_HERE, |
| 94 base::Bind(&ComponentInstallerTraits::ComponentReady, | 94 base::Bind(&ComponentInstallerTraits::ComponentReady, |
| 95 base::Unretained(installer_traits_.get()), | 95 base::Unretained(installer_traits_.get()), |
| 96 current_version_, | 96 current_version_, |
| 97 GetInstallDirectory(), | 97 GetInstallDirectory(), |
| 98 base::Passed(&manifest_copy))); | 98 base::Passed(&manifest_copy))); |
| 99 return true; | 99 return true; |
| 100 } | 100 } |
| 101 | 101 |
| 102 void DefaultComponentInstaller::OnInstallError( |
| 103 const InstallerSourceSerializer& serializer) { |
| 104 } |
| 105 |
| 102 bool DefaultComponentInstaller::GetInstalledFile( | 106 bool DefaultComponentInstaller::GetInstalledFile( |
| 103 const std::string& file, | 107 const std::string& file, |
| 104 base::FilePath* installed_file) { | 108 base::FilePath* installed_file) { |
| 105 if (current_version_.Equals(base::Version(kNullVersion))) | 109 if (current_version_.Equals(base::Version(kNullVersion))) |
| 106 return false; // No component has been installed yet. | 110 return false; // No component has been installed yet. |
| 107 | 111 |
| 108 *installed_file = installer_traits_->GetBaseDirectory() | 112 *installed_file = installer_traits_->GetBaseDirectory() |
| 109 .AppendASCII(current_version_.GetString()) | 113 .AppendASCII(current_version_.GetString()) |
| 110 .AppendASCII(file); | 114 .AppendASCII(file); |
| 111 return true; | 115 return true; |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 | 214 |
| 211 if (current_version_.CompareTo(base::Version(kNullVersion)) > 0) { | 215 if (current_version_.CompareTo(base::Version(kNullVersion)) > 0) { |
| 212 scoped_ptr<base::DictionaryValue> manifest_copy( | 216 scoped_ptr<base::DictionaryValue> manifest_copy( |
| 213 current_manifest_->DeepCopy()); | 217 current_manifest_->DeepCopy()); |
| 214 installer_traits_->ComponentReady( | 218 installer_traits_->ComponentReady( |
| 215 current_version_, GetInstallDirectory(), manifest_copy.Pass()); | 219 current_version_, GetInstallDirectory(), manifest_copy.Pass()); |
| 216 } | 220 } |
| 217 } | 221 } |
| 218 | 222 |
| 219 } // namespace component_updater | 223 } // namespace component_updater |
| OLD | NEW |