blob: 33680d13eb614486ae0ca9c48808b721b7ce2e00 [file] [log] [blame]
[email protected]de0fdca22014-08-19 05:26:091// Copyright 2014 The Chromium Authors. All rights reserved.
[email protected]e8f96ff2011-08-03 05:07:332// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
[email protected]de0fdca22014-08-19 05:26:095#include "components/component_updater/component_updater_service.h"
[email protected]e8f96ff2011-08-03 05:07:336
7#include <algorithm>
sorin7c717622015-05-26 19:59:098#include <map>
9#include <string>
10#include <utility>
[email protected]e8f96ff2011-08-03 05:07:3311#include <vector>
12
[email protected]44da56e2011-11-21 19:59:1413#include "base/bind.h"
sorin395c2ac2014-09-16 21:31:0714#include "base/bind_helpers.h"
[email protected]78efe2e92014-08-08 15:53:2215#include "base/callback.h"
[email protected]57999812013-02-24 05:40:5216#include "base/files/file_path.h"
thestig819adcc82014-09-10 22:24:5317#include "base/files/file_util.h"
[email protected]e8f96ff2011-08-03 05:07:3318#include "base/logging.h"
sorin5cb1f5492014-09-23 04:07:4419#include "base/macros.h"
dchenga0ee5fb82016-04-26 02:46:5520#include "base/memory/ptr_util.h"
sorin85953dc2016-03-10 00:32:4821#include "base/metrics/histogram_macros.h"
[email protected]f5d27e32014-01-31 06:48:5322#include "base/sequenced_task_runner.h"
sorin7c717622015-05-26 19:59:0923#include "base/single_thread_task_runner.h"
waffles77255cc2016-08-02 17:25:1224#include "base/strings/utf_string_conversions.h"
[email protected]8f5f2ea2013-10-31 09:39:1025#include "base/threading/sequenced_worker_pool.h"
[email protected]ed6fb982014-07-23 16:56:5226#include "base/threading/thread_checker.h"
gab7966d312016-05-11 20:35:0127#include "base/threading/thread_task_runner_handle.h"
sorin85953dc2016-03-10 00:32:4828#include "base/time/time.h"
[email protected]41a17c52013-06-28 00:27:5329#include "base/timer/timer.h"
sorin7c717622015-05-26 19:59:0930#include "components/component_updater/component_updater_service_internal.h"
31#include "components/component_updater/timer.h"
sorineae115a2016-08-26 02:27:2032#if defined(OS_WIN)
33#include "components/component_updater/updater_state_win.h"
34#endif
sorin52ac0882015-01-24 01:15:0035#include "components/update_client/configurator.h"
sorin52ac0882015-01-24 01:15:0036#include "components/update_client/crx_update_item.h"
sorin52ac0882015-01-24 01:15:0037#include "components/update_client/update_client.h"
sorin52ac0882015-01-24 01:15:0038#include "components/update_client/utils.h"
[email protected]761fa4702013-07-02 15:25:1539#include "url/gurl.h"
[email protected]e8f96ff2011-08-03 05:07:3340
sorin7c717622015-05-26 19:59:0941using CrxInstaller = update_client::CrxInstaller;
42using UpdateClient = update_client::UpdateClient;
sorin52ac0882015-01-24 01:15:0043
sorin85953dc2016-03-10 00:32:4844namespace {
45
46enum UpdateType {
47 UPDATE_TYPE_MANUAL = 0,
48 UPDATE_TYPE_AUTOMATIC,
49 UPDATE_TYPE_COUNT,
50};
51
sorineae115a2016-08-26 02:27:2052const char kRecoveryComponentId[] = "npdjjkjlcidkjlamlmmdelcjbcpdjocm";
53
sorin85953dc2016-03-10 00:32:4854} // namespace
55
[email protected]055981f2014-01-17 20:22:3256namespace component_updater {
[email protected]3a0092d2013-12-18 03:04:3557
waffles77255cc2016-08-02 17:25:1258ComponentInfo::ComponentInfo(const std::string& id, const base::string16& name)
59 : id(id), name(name) {}
60ComponentInfo::~ComponentInfo() {}
61
sorin7c717622015-05-26 19:59:0962CrxUpdateService::CrxUpdateService(
63 const scoped_refptr<Configurator>& config,
64 const scoped_refptr<UpdateClient>& update_client)
[email protected]e8f96ff2011-08-03 05:07:3365 : config_(config),
sorin7c717622015-05-26 19:59:0966 update_client_(update_client),
67 blocking_task_runner_(config->GetSequencedTaskRunner()) {
68 AddObserver(this);
[email protected]1ea21ad2013-09-02 04:20:3969}
[email protected]e8f96ff2011-08-03 05:07:3370
71CrxUpdateService::~CrxUpdateService() {
sorin7c717622015-05-26 19:59:0972 DCHECK(thread_checker_.CalledOnValidThread());
73
74 for (const auto item : ready_callbacks_) {
75 item.second.Run();
76 }
77
78 RemoveObserver(this);
79
[email protected]e8f96ff2011-08-03 05:07:3380 Stop();
[email protected]1ea21ad2013-09-02 04:20:3981}
[email protected]e8f96ff2011-08-03 05:07:3382
[email protected]d3268fe2014-04-25 02:14:2383void CrxUpdateService::AddObserver(Observer* observer) {
[email protected]ed6fb982014-07-23 16:56:5284 DCHECK(thread_checker_.CalledOnValidThread());
sorin7c717622015-05-26 19:59:0985 update_client_->AddObserver(observer);
[email protected]d3268fe2014-04-25 02:14:2386}
87
88void CrxUpdateService::RemoveObserver(Observer* observer) {
[email protected]ed6fb982014-07-23 16:56:5289 DCHECK(thread_checker_.CalledOnValidThread());
sorin7c717622015-05-26 19:59:0990 update_client_->RemoveObserver(observer);
[email protected]d3268fe2014-04-25 02:14:2391}
92
sorin7c717622015-05-26 19:59:0993void CrxUpdateService::Start() {
94 DCHECK(thread_checker_.CalledOnValidThread());
95 VLOG(1) << "CrxUpdateService starting up. "
96 << "First update attempt will take place in "
97 << config_->InitialDelay() << " seconds. "
98 << "Next update attempt will take place in "
99 << config_->NextCheckDelay() << " seconds. ";
[email protected]e8f96ff2011-08-03 05:07:33100
sorin7c717622015-05-26 19:59:09101 timer_.Start(
102 base::TimeDelta::FromSeconds(config_->InitialDelay()),
103 base::TimeDelta::FromSeconds(config_->NextCheckDelay()),
104 base::Bind(base::IgnoreResult(&CrxUpdateService::CheckForUpdates),
105 base::Unretained(this)));
[email protected]e8f96ff2011-08-03 05:07:33106}
107
sorin7c717622015-05-26 19:59:09108// Stops the update loop. In flight operations will be completed.
109void CrxUpdateService::Stop() {
110 DCHECK(thread_checker_.CalledOnValidThread());
[email protected]fb53e652014-04-30 11:27:19111 VLOG(1) << "CrxUpdateService stopping";
[email protected]e8f96ff2011-08-03 05:07:33112 timer_.Stop();
sorinecaad3e2015-11-13 19:15:52113 update_client_->Stop();
[email protected]e8f96ff2011-08-03 05:07:33114}
115
116// Adds a component to be checked for upgrades. If the component exists it
sorin7c717622015-05-26 19:59:09117// it will be replaced.
118bool CrxUpdateService::RegisterComponent(const CrxComponent& component) {
[email protected]ed6fb982014-07-23 16:56:52119 DCHECK(thread_checker_.CalledOnValidThread());
[email protected]d0c8b8b42014-05-06 05:11:45120 if (component.pk_hash.empty() || !component.version.IsValid() ||
sorin7c717622015-05-26 19:59:09121 !component.installer) {
122 return false;
[email protected]e8f96ff2011-08-03 05:07:33123 }
124
sorin7c717622015-05-26 19:59:09125 // Update the registration data if the component has been registered before.
126 const std::string id(GetCrxComponentID(component));
127 auto it = components_.find(id);
128 if (it != components_.end()) {
129 it->second = component;
130 return true;
[email protected]10bc0222014-06-11 13:44:38131 }
[email protected]e8f96ff2011-08-03 05:07:33132
sorin7c717622015-05-26 19:59:09133 components_.insert(std::make_pair(id, component));
134 components_order_.push_back(id);
waffles77255cc2016-08-02 17:25:12135 for (const auto& mime_type : component.handled_mime_types)
136 component_ids_by_mime_type_[mime_type] = id;
sorin7c717622015-05-26 19:59:09137
138 // Create an initial state for this component. The state is mutated in
139 // response to events from the UpdateClient instance.
140 CrxUpdateItem item;
141 item.id = id;
142 item.component = component;
143 const auto inserted = component_states_.insert(std::make_pair(id, item));
144 DCHECK(inserted.second);
145
146 // Start the timer if this is the first component registered. The first timer
147 // event occurs after an interval defined by the component update
148 // configurator. The subsequent timer events are repeated with a period
149 // defined by the same configurator.
150 if (components_.size() == 1)
151 Start();
152
153 return true;
[email protected]e8f96ff2011-08-03 05:07:33154}
155
sorin7c717622015-05-26 19:59:09156bool CrxUpdateService::UnregisterComponent(const std::string& id) {
157 DCHECK(thread_checker_.CalledOnValidThread());
158 auto it = components_.find(id);
159 if (it == components_.end())
160 return false;
bauerb1f6657e72015-02-09 00:00:27161
sorin7c717622015-05-26 19:59:09162 DCHECK_EQ(id, it->first);
bauerb1f6657e72015-02-09 00:00:27163
sorin7c717622015-05-26 19:59:09164 // Delay the uninstall of the component if the component is being updated.
165 if (update_client_->IsUpdating(id)) {
166 components_pending_unregistration_.push_back(id);
167 return true;
168 }
169
170 return DoUnregisterComponent(it->second);
171}
172
173bool CrxUpdateService::DoUnregisterComponent(const CrxComponent& component) {
174 DCHECK(thread_checker_.CalledOnValidThread());
175
176 const auto id = GetCrxComponentID(component);
177 DCHECK(ready_callbacks_.find(id) == ready_callbacks_.end());
178
179 const bool result = component.installer->Uninstall();
180
181 const auto pos =
182 std::find(components_order_.begin(), components_order_.end(), id);
183 if (pos != components_order_.end())
184 components_order_.erase(pos);
185
186 components_.erase(id);
187 component_states_.erase(id);
188
189 return result;
bauerb1f6657e72015-02-09 00:00:27190}
191
[email protected]68bf09e2014-06-03 00:10:56192std::vector<std::string> CrxUpdateService::GetComponentIDs() const {
[email protected]ed6fb982014-07-23 16:56:52193 DCHECK(thread_checker_.CalledOnValidThread());
sorin7c717622015-05-26 19:59:09194 std::vector<std::string> ids;
195 for (const auto& it : components_)
196 ids.push_back(it.first);
197 return ids;
[email protected]68bf09e2014-06-03 00:10:56198}
199
waffles77255cc2016-08-02 17:25:12200std::unique_ptr<ComponentInfo> CrxUpdateService::GetComponentForMimeType(
201 const std::string& mime_type) const {
202 DCHECK(thread_checker_.CalledOnValidThread());
203 const auto it = component_ids_by_mime_type_.find(mime_type);
204 if (it == component_ids_by_mime_type_.end())
205 return nullptr;
206 const auto component = GetComponent(it->second);
207 if (!component)
208 return nullptr;
209 return base::MakeUnique<ComponentInfo>(GetCrxComponentID(*component),
210 base::UTF8ToUTF16(component->name));
211}
212
[email protected]78efe2e92014-08-08 15:53:22213OnDemandUpdater& CrxUpdateService::GetOnDemandUpdater() {
sorin7c717622015-05-26 19:59:09214 DCHECK(thread_checker_.CalledOnValidThread());
[email protected]78efe2e92014-08-08 15:53:22215 return *this;
216}
217
sorin7c717622015-05-26 19:59:09218const CrxComponent* CrxUpdateService::GetComponent(
219 const std::string& id) const {
220 DCHECK(thread_checker_.CalledOnValidThread());
221 const auto it(components_.find(id));
222 return it != components_.end() ? &(it->second) : NULL;
223}
224
225const CrxUpdateItem* CrxUpdateService::GetComponentState(
226 const std::string& id) const {
227 DCHECK(thread_checker_.CalledOnValidThread());
228 const auto it(component_states_.find(id));
229 return it != component_states_.end() ? &it->second : NULL;
230}
231
232void CrxUpdateService::MaybeThrottle(const std::string& id,
[email protected]78efe2e92014-08-08 15:53:22233 const base::Closure& callback) {
234 DCHECK(thread_checker_.CalledOnValidThread());
sorin7c717622015-05-26 19:59:09235 auto it = components_.find(id);
236 if (it != components_.end()) {
237 DCHECK_EQ(it->first, id);
238 if (OnDemandUpdateWithCooldown(id)) {
239 ready_callbacks_.insert(std::make_pair(id, callback));
240 return;
241 }
[email protected]78efe2e92014-08-08 15:53:22242 }
sorin7c717622015-05-26 19:59:09243
244 callback.Run(); // Unblock the request if the request can't be throttled.
245}
246
sorin4c520182016-08-19 17:27:44247void CrxUpdateService::OnDemandUpdate(const std::string& id,
248 CompletionCallback callback) {
sorin7c717622015-05-26 19:59:09249 DCHECK(thread_checker_.CalledOnValidThread());
250
sorin4c520182016-08-19 17:27:44251 if (!GetComponent(id)) {
252 base::ThreadTaskRunnerHandle::Get()->PostTask(
253 FROM_HERE,
254 base::Bind(callback,
255 update_client::Error::ERROR_UPDATE_INVALID_ARGUMENT));
256 return;
257 }
sorin7c717622015-05-26 19:59:09258
sorin4c520182016-08-19 17:27:44259 OnDemandUpdateInternal(id, callback);
sorin7c717622015-05-26 19:59:09260}
261
262bool CrxUpdateService::OnDemandUpdateWithCooldown(const std::string& id) {
263 DCHECK(thread_checker_.CalledOnValidThread());
264
265 DCHECK(GetComponent(id));
266
267 // Check if the request is too soon.
vmpstr2de366b2016-07-20 21:35:48268 const auto* component_state(GetComponentState(id));
sorin7c717622015-05-26 19:59:09269 if (component_state) {
sorin1827db12016-09-15 20:43:31270 base::TimeDelta delta =
271 base::TimeTicks::Now() - component_state->last_check;
sorin7c717622015-05-26 19:59:09272 if (delta < base::TimeDelta::FromSeconds(config_->OnDemandDelay()))
273 return false;
274 }
275
sorin4c520182016-08-19 17:27:44276 OnDemandUpdateInternal(id, CompletionCallback());
277 return true;
sorin7c717622015-05-26 19:59:09278}
279
sorin4c520182016-08-19 17:27:44280void CrxUpdateService::OnDemandUpdateInternal(const std::string& id,
281 CompletionCallback callback) {
sorin7c717622015-05-26 19:59:09282 DCHECK(thread_checker_.CalledOnValidThread());
283
sorin85953dc2016-03-10 00:32:48284 UMA_HISTOGRAM_ENUMERATION("ComponentUpdater.Calls", UPDATE_TYPE_MANUAL,
285 UPDATE_TYPE_COUNT);
sorin7c717622015-05-26 19:59:09286 update_client_->Install(
287 id, base::Bind(&CrxUpdateService::OnUpdate, base::Unretained(this)),
sorin85953dc2016-03-10 00:32:48288 base::Bind(&CrxUpdateService::OnUpdateComplete, base::Unretained(this),
sorin4c520182016-08-19 17:27:44289 callback, base::TimeTicks::Now()));
sorin7c717622015-05-26 19:59:09290}
291
292bool CrxUpdateService::CheckForUpdates() {
293 DCHECK(thread_checker_.CalledOnValidThread());
sorin85953dc2016-03-10 00:32:48294
295 UMA_HISTOGRAM_ENUMERATION("ComponentUpdater.Calls", UPDATE_TYPE_AUTOMATIC,
296 UPDATE_TYPE_COUNT);
297
sorinfccbf2d2016-04-04 20:34:34298 std::vector<std::string> secure_ids; // Requires HTTPS for update checks.
299 std::vector<std::string> unsecure_ids; // Can fallback to HTTP.
sorin7c717622015-05-26 19:59:09300 for (const auto id : components_order_) {
301 DCHECK(components_.find(id) != components_.end());
sorinfccbf2d2016-04-04 20:34:34302
vmpstr2de366b2016-07-20 21:35:48303 auto* component(GetComponent(id));
sorinfccbf2d2016-04-04 20:34:34304 if (!component || component->requires_network_encryption)
305 secure_ids.push_back(id);
306 else
307 unsecure_ids.push_back(id);
sorin7c717622015-05-26 19:59:09308 }
309
sorinfccbf2d2016-04-04 20:34:34310 if (!unsecure_ids.empty()) {
311 update_client_->Update(
312 unsecure_ids,
313 base::Bind(&CrxUpdateService::OnUpdate, base::Unretained(this)),
314 base::Bind(&CrxUpdateService::OnUpdateComplete, base::Unretained(this),
sorin4c520182016-08-19 17:27:44315 CompletionCallback(), base::TimeTicks::Now()));
sorinfccbf2d2016-04-04 20:34:34316 }
317
318 if (!secure_ids.empty()) {
319 update_client_->Update(
320 secure_ids,
321 base::Bind(&CrxUpdateService::OnUpdate, base::Unretained(this)),
322 base::Bind(&CrxUpdateService::OnUpdateComplete, base::Unretained(this),
sorin4c520182016-08-19 17:27:44323 CompletionCallback(), base::TimeTicks::Now()));
sorinfccbf2d2016-04-04 20:34:34324 }
sorin7c717622015-05-26 19:59:09325
326 return true;
[email protected]78efe2e92014-08-08 15:53:22327}
328
329scoped_refptr<base::SequencedTaskRunner>
330CrxUpdateService::GetSequencedTaskRunner() {
sorin7c717622015-05-26 19:59:09331 DCHECK(thread_checker_.CalledOnValidThread());
bauerb1f6657e72015-02-09 00:00:27332 return blocking_task_runner_;
[email protected]78efe2e92014-08-08 15:53:22333}
334
sorin7c717622015-05-26 19:59:09335bool CrxUpdateService::GetComponentDetails(const std::string& id,
[email protected]f392e372014-06-12 07:25:57336 CrxUpdateItem* item) const {
[email protected]ed6fb982014-07-23 16:56:52337 DCHECK(thread_checker_.CalledOnValidThread());
sorin7c717622015-05-26 19:59:09338
339 // First, if this component is currently being updated, return its state from
340 // the update client.
341 if (update_client_->GetCrxUpdateState(id, item))
342 return true;
343
344 // Otherwise, return the last seen state of the component, if such a
345 // state exists.
346 const auto component_states_it = component_states_.find(id);
347 if (component_states_it != component_states_.end()) {
348 *item = component_states_it->second;
349 return true;
350 }
351
352 return false;
[email protected]2e919ddd2013-08-21 05:05:17353}
354
sorin7c717622015-05-26 19:59:09355void CrxUpdateService::OnUpdate(const std::vector<std::string>& ids,
356 std::vector<CrxComponent>* components) {
357 DCHECK(thread_checker_.CalledOnValidThread());
358 DCHECK(components->empty());
359
360 for (const auto& id : ids) {
sorineae115a2016-08-26 02:27:20361 const update_client::CrxComponent* registered_component(GetComponent(id));
sorin7c717622015-05-26 19:59:09362 if (registered_component) {
363 components->push_back(*registered_component);
sorineae115a2016-08-26 02:27:20364 if (id == kRecoveryComponentId) {
365 // Override the installer attributes for the recovery component in the
366 // components which will be checked for updates.
367 update_client::CrxComponent& recovery_component(components->back());
368 recovery_component.installer_attributes =
369 GetInstallerAttributesForRecoveryComponentInstaller(
370 recovery_component);
371 }
sorin7c717622015-05-26 19:59:09372 }
373 }
[email protected]ed6fb982014-07-23 16:56:52374}
375
sorin4c520182016-08-19 17:27:44376void CrxUpdateService::OnUpdateComplete(CompletionCallback callback,
377 const base::TimeTicks& start_time,
sorin85953dc2016-03-10 00:32:48378 int error) {
sorin7c717622015-05-26 19:59:09379 DCHECK(thread_checker_.CalledOnValidThread());
380 VLOG(1) << "Update completed with error " << error;
381
sorin85953dc2016-03-10 00:32:48382 UMA_HISTOGRAM_BOOLEAN("ComponentUpdater.UpdateCompleteResult", error != 0);
383 UMA_HISTOGRAM_LONG_TIMES_100("ComponentUpdater.UpdateCompleteTime",
384 base::TimeTicks::Now() - start_time);
385
sorin7c717622015-05-26 19:59:09386 for (const auto id : components_pending_unregistration_) {
387 if (!update_client_->IsUpdating(id)) {
vmpstr2de366b2016-07-20 21:35:48388 const auto* component = GetComponent(id);
sorin7c717622015-05-26 19:59:09389 if (component)
390 DoUnregisterComponent(*component);
391 }
392 }
sorin4c520182016-08-19 17:27:44393
394 if (!callback.is_null()) {
395 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE,
396 base::Bind(callback, error));
397 }
sorin7c717622015-05-26 19:59:09398}
399
400void CrxUpdateService::OnEvent(Events event, const std::string& id) {
[email protected]ed6fb982014-07-23 16:56:52401 DCHECK(thread_checker_.CalledOnValidThread());
[email protected]93e8e2c2014-01-04 12:29:23402
sorin7c717622015-05-26 19:59:09403 // Unblock all throttles for the component.
404 if (event == Observer::Events::COMPONENT_UPDATED ||
405 event == Observer::Events::COMPONENT_NOT_UPDATED) {
406 auto callbacks = ready_callbacks_.equal_range(id);
407 for (auto it = callbacks.first; it != callbacks.second; ++it) {
408 it->second.Run();
409 }
410 ready_callbacks_.erase(id);
411 }
412
413 CrxUpdateItem update_item;
414 if (!update_client_->GetCrxUpdateState(id, &update_item))
[email protected]e8f96ff2011-08-03 05:07:33415 return;
[email protected]93e8e2c2014-01-04 12:29:23416
sorin7c717622015-05-26 19:59:09417 // Update the state of the item.
418 auto it = component_states_.find(id);
419 DCHECK(it != component_states_.end());
420 it->second = update_item;
bauerb1f6657e72015-02-09 00:00:27421
sorin7c717622015-05-26 19:59:09422 // Update the component registration with the new version.
423 if (event == Observer::Events::COMPONENT_UPDATED) {
vmpstr2de366b2016-07-20 21:35:48424 auto* component(const_cast<CrxComponent*>(GetComponent(id)));
sorin7c717622015-05-26 19:59:09425 if (component) {
426 component->version = update_item.next_version;
427 component->fingerprint = update_item.next_fp;
bauerb1f6657e72015-02-09 00:00:27428 }
429 }
[email protected]68bf09e2014-06-03 00:10:56430}
431
sorineae115a2016-08-26 02:27:20432update_client::InstallerAttributes
433CrxUpdateService::GetInstallerAttributesForRecoveryComponentInstaller(
434 const CrxComponent& crx_component) const {
435 update_client::InstallerAttributes installer_attributes;
436#if defined(OS_WIN)
437 DCHECK_EQ("recovery", crx_component.name);
438
439 const bool is_machine =
440 crx_component.installer_attributes.count("ismachine") &&
441 crx_component.installer_attributes.at("ismachine") == "1";
442
443 auto updater_state(UpdaterState::Create(is_machine));
444 if (updater_state) {
445 installer_attributes = updater_state->MakeInstallerAttributes();
446 }
447#endif
448 return installer_attributes;
449}
450
[email protected]00a77fa2013-11-02 04:18:46451///////////////////////////////////////////////////////////////////////////////
452
[email protected]e8f96ff2011-08-03 05:07:33453// The component update factory. Using the component updater as a singleton
454// is the job of the browser process.
sorin7c717622015-05-26 19:59:09455// TODO(sorin): consider making this a singleton.
dchenga0ee5fb82016-04-26 02:46:55456std::unique_ptr<ComponentUpdateService> ComponentUpdateServiceFactory(
sorin9797aba2015-04-17 17:15:03457 const scoped_refptr<Configurator>& config) {
[email protected]e8f96ff2011-08-03 05:07:33458 DCHECK(config);
sorin7c717622015-05-26 19:59:09459 auto update_client = update_client::UpdateClientFactory(config);
ricea85ec57952016-08-31 09:34:10460 return base::MakeUnique<CrxUpdateService>(config, std::move(update_client));
[email protected]e8f96ff2011-08-03 05:07:33461}
[email protected]2cddef42013-11-22 08:23:22462
[email protected]055981f2014-01-17 20:22:32463} // namespace component_updater