Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/update_client/update_engine.h" | 5 #include "components/update_client/update_engine.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 51 UpdateEngine::UpdateEngine( | 51 UpdateEngine::UpdateEngine( |
| 52 const scoped_refptr<Configurator>& config, | 52 const scoped_refptr<Configurator>& config, |
| 53 UpdateChecker::Factory update_checker_factory, | 53 UpdateChecker::Factory update_checker_factory, |
| 54 CrxDownloader::Factory crx_downloader_factory, | 54 CrxDownloader::Factory crx_downloader_factory, |
| 55 PingManager* ping_manager, | 55 PingManager* ping_manager, |
| 56 const NotifyObserversCallback& notify_observers_callback) | 56 const NotifyObserversCallback& notify_observers_callback) |
| 57 : config_(config), | 57 : config_(config), |
| 58 update_checker_factory_(update_checker_factory), | 58 update_checker_factory_(update_checker_factory), |
| 59 crx_downloader_factory_(crx_downloader_factory), | 59 crx_downloader_factory_(crx_downloader_factory), |
| 60 ping_manager_(ping_manager), | 60 ping_manager_(ping_manager), |
| 61 metadata_(new PersistedData(config->GetPrefService())), | 61 metadata_(std::move(config->CreateMetadata())), |
|
waffles
2017/05/15 17:52:19
remove std::move. (moving a temporary object preve
| |
| 62 notify_observers_callback_(notify_observers_callback) {} | 62 notify_observers_callback_(notify_observers_callback) {} |
| 63 | 63 |
| 64 UpdateEngine::~UpdateEngine() { | 64 UpdateEngine::~UpdateEngine() { |
| 65 DCHECK(thread_checker_.CalledOnValidThread()); | 65 DCHECK(thread_checker_.CalledOnValidThread()); |
| 66 } | 66 } |
| 67 | 67 |
| 68 void UpdateEngine::Update( | 68 void UpdateEngine::Update( |
| 69 bool is_foreground, | 69 bool is_foreground, |
| 70 const std::vector<std::string>& ids, | 70 const std::vector<std::string>& ids, |
| 71 const UpdateClient::CrxDataCallback& crx_data_callback, | 71 const UpdateClient::CrxDataCallback& crx_data_callback, |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 361 component->Uninstall(version, reason); | 361 component->Uninstall(version, reason); |
| 362 | 362 |
| 363 update_context->component_queue.push(id); | 363 update_context->component_queue.push(id); |
| 364 | 364 |
| 365 base::ThreadTaskRunnerHandle::Get()->PostTask( | 365 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| 366 FROM_HERE, | 366 FROM_HERE, |
| 367 base::Bind(&UpdateEngine::HandleComponent, base::Unretained(this), it)); | 367 base::Bind(&UpdateEngine::HandleComponent, base::Unretained(this), it)); |
| 368 } | 368 } |
| 369 | 369 |
| 370 } // namespace update_client | 370 } // namespace update_client |
| OLD | NEW |