| 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 "components/update_client/update_checker.h" | 5 #include "components/update_client/update_checker.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 auto urls(config_->UpdateUrl()); | 166 auto urls(config_->UpdateUrl()); |
| 167 if (IsEncryptionRequired(items_to_check)) | 167 if (IsEncryptionRequired(items_to_check)) |
| 168 RemoveUnsecureUrls(&urls); | 168 RemoveUnsecureUrls(&urls); |
| 169 | 169 |
| 170 std::unique_ptr<std::vector<std::string>> ids_checked( | 170 std::unique_ptr<std::vector<std::string>> ids_checked( |
| 171 new std::vector<std::string>()); | 171 new std::vector<std::string>()); |
| 172 for (auto* crx : items_to_check) | 172 for (auto* crx : items_to_check) |
| 173 ids_checked->push_back(crx->id); | 173 ids_checked->push_back(crx->id); |
| 174 request_sender_.reset(new RequestSender(config_)); | 174 request_sender_.reset(new RequestSender(config_)); |
| 175 request_sender_->Send( | 175 request_sender_->Send( |
| 176 config_->UseCupSigning(), | 176 config_->EnabledCupSigning(), |
| 177 BuildUpdateCheckRequest(*config_, items_to_check, metadata_, | 177 BuildUpdateCheckRequest(*config_, items_to_check, metadata_, |
| 178 additional_attributes), | 178 additional_attributes), |
| 179 urls, base::Bind(&UpdateCheckerImpl::OnRequestSenderComplete, | 179 urls, base::Bind(&UpdateCheckerImpl::OnRequestSenderComplete, |
| 180 base::Unretained(this), base::Passed(&ids_checked))); | 180 base::Unretained(this), base::Passed(&ids_checked))); |
| 181 return true; | 181 return true; |
| 182 } | 182 } |
| 183 | 183 |
| 184 void UpdateCheckerImpl::OnRequestSenderComplete( | 184 void UpdateCheckerImpl::OnRequestSenderComplete( |
| 185 std::unique_ptr<std::vector<std::string>> ids_checked, | 185 std::unique_ptr<std::vector<std::string>> ids_checked, |
| 186 int error, | 186 int error, |
| (...skipping 25 matching lines...) Expand all Loading... |
| 212 } // namespace | 212 } // namespace |
| 213 | 213 |
| 214 std::unique_ptr<UpdateChecker> UpdateChecker::Create( | 214 std::unique_ptr<UpdateChecker> UpdateChecker::Create( |
| 215 const scoped_refptr<Configurator>& config, | 215 const scoped_refptr<Configurator>& config, |
| 216 PersistedData* persistent) { | 216 PersistedData* persistent) { |
| 217 return std::unique_ptr<UpdateChecker>( | 217 return std::unique_ptr<UpdateChecker>( |
| 218 new UpdateCheckerImpl(config, persistent)); | 218 new UpdateCheckerImpl(config, persistent)); |
| 219 } | 219 } |
| 220 | 220 |
| 221 } // namespace update_client | 221 } // namespace update_client |
| OLD | NEW |