| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/ev_whitelist_component_installer.h" | 5 #include "chrome/browser/component_updater/ev_whitelist_component_installer.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 | 74 |
| 75 bool EVWhitelistComponentInstallerTraits:: | 75 bool EVWhitelistComponentInstallerTraits:: |
| 76 SupportsGroupPolicyEnabledComponentUpdates() const { | 76 SupportsGroupPolicyEnabledComponentUpdates() const { |
| 77 return false; | 77 return false; |
| 78 } | 78 } |
| 79 | 79 |
| 80 bool EVWhitelistComponentInstallerTraits::RequiresNetworkEncryption() const { | 80 bool EVWhitelistComponentInstallerTraits::RequiresNetworkEncryption() const { |
| 81 return false; | 81 return false; |
| 82 } | 82 } |
| 83 | 83 |
| 84 update_client::CrxInstaller::Result | 84 bool EVWhitelistComponentInstallerTraits::OnCustomInstall( |
| 85 EVWhitelistComponentInstallerTraits::OnCustomInstall( | |
| 86 const base::DictionaryValue& manifest, | 85 const base::DictionaryValue& manifest, |
| 87 const base::FilePath& install_dir) { | 86 const base::FilePath& install_dir) { |
| 88 VLOG(1) << "Entering EVWhitelistComponentInstallerTraits::OnCustomInstall."; | 87 VLOG(1) << "Entering EVWhitelistComponentInstallerTraits::OnCustomInstall."; |
| 89 | 88 |
| 90 return update_client::CrxInstaller::Result(0); // Nothing custom here. | 89 return true; // Nothing custom here. |
| 91 } | 90 } |
| 92 | 91 |
| 93 base::FilePath EVWhitelistComponentInstallerTraits::GetInstalledPath( | 92 base::FilePath EVWhitelistComponentInstallerTraits::GetInstalledPath( |
| 94 const base::FilePath& base) { | 93 const base::FilePath& base) { |
| 95 // EV whitelist is encoded the same way for all platforms | 94 // EV whitelist is encoded the same way for all platforms |
| 96 return base.Append(FILE_PATH_LITERAL("_platform_specific")) | 95 return base.Append(FILE_PATH_LITERAL("_platform_specific")) |
| 97 .Append(FILE_PATH_LITERAL("all")) | 96 .Append(FILE_PATH_LITERAL("all")) |
| 98 .Append(kCompressedEVWhitelistFileName); | 97 .Append(kCompressedEVWhitelistFileName); |
| 99 } | 98 } |
| 100 | 99 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 DefaultComponentInstaller* installer = | 153 DefaultComponentInstaller* installer = |
| 155 new DefaultComponentInstaller(std::move(traits)); | 154 new DefaultComponentInstaller(std::move(traits)); |
| 156 installer->Register(cus, base::Closure()); | 155 installer->Register(cus, base::Closure()); |
| 157 | 156 |
| 158 content::BrowserThread::PostAfterStartupTask( | 157 content::BrowserThread::PostAfterStartupTask( |
| 159 FROM_HERE, content::BrowserThread::GetBlockingPool(), | 158 FROM_HERE, content::BrowserThread::GetBlockingPool(), |
| 160 base::Bind(&DeleteWhitelistCopy, user_data_dir)); | 159 base::Bind(&DeleteWhitelistCopy, user_data_dir)); |
| 161 } | 160 } |
| 162 | 161 |
| 163 } // namespace component_updater | 162 } // namespace component_updater |
| OLD | NEW |