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 <string> | 7 #include <string> |
| 8 #include <utility> |
8 #include <vector> | 9 #include <vector> |
9 | 10 |
10 #include "base/bind.h" | 11 #include "base/bind.h" |
11 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
12 #include "base/files/file_util.h" | 13 #include "base/files/file_util.h" |
13 #include "base/logging.h" | 14 #include "base/logging.h" |
14 #include "base/macros.h" | 15 #include "base/macros.h" |
15 #include "base/path_service.h" | 16 #include "base/path_service.h" |
16 #include "base/version.h" | 17 #include "base/version.h" |
17 #include "components/component_updater/component_updater_paths.h" | 18 #include "components/component_updater/component_updater_paths.h" |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 } | 129 } |
129 | 130 |
130 void RegisterEVWhitelistComponent(ComponentUpdateService* cus, | 131 void RegisterEVWhitelistComponent(ComponentUpdateService* cus, |
131 const base::FilePath& user_data_dir) { | 132 const base::FilePath& user_data_dir) { |
132 VLOG(1) << "Registering EV whitelist component."; | 133 VLOG(1) << "Registering EV whitelist component."; |
133 | 134 |
134 scoped_ptr<ComponentInstallerTraits> traits( | 135 scoped_ptr<ComponentInstallerTraits> traits( |
135 new EVWhitelistComponentInstallerTraits()); | 136 new EVWhitelistComponentInstallerTraits()); |
136 // |cus| will take ownership of |installer| during installer->Register(cus). | 137 // |cus| will take ownership of |installer| during installer->Register(cus). |
137 DefaultComponentInstaller* installer = | 138 DefaultComponentInstaller* installer = |
138 new DefaultComponentInstaller(traits.Pass()); | 139 new DefaultComponentInstaller(std::move(traits)); |
139 installer->Register(cus, base::Closure()); | 140 installer->Register(cus, base::Closure()); |
140 | 141 |
141 content::BrowserThread::PostAfterStartupTask( | 142 content::BrowserThread::PostAfterStartupTask( |
142 FROM_HERE, content::BrowserThread::GetBlockingPool(), | 143 FROM_HERE, content::BrowserThread::GetBlockingPool(), |
143 base::Bind(&DeleteWhitelistCopy, user_data_dir)); | 144 base::Bind(&DeleteWhitelistCopy, user_data_dir)); |
144 } | 145 } |
145 | 146 |
146 } // namespace component_updater | 147 } // namespace component_updater |
OLD | NEW |