| 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/component_updater/update_checker.h" | 5 #include "components/component_updater/update_checker.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 | 78 |
| 79 class UpdateCheckerImpl : public UpdateChecker { | 79 class UpdateCheckerImpl : public UpdateChecker { |
| 80 public: | 80 public: |
| 81 explicit UpdateCheckerImpl(const Configurator& config); | 81 explicit UpdateCheckerImpl(const Configurator& config); |
| 82 virtual ~UpdateCheckerImpl(); | 82 virtual ~UpdateCheckerImpl(); |
| 83 | 83 |
| 84 // Overrides for UpdateChecker. | 84 // Overrides for UpdateChecker. |
| 85 virtual bool CheckForUpdates( | 85 virtual bool CheckForUpdates( |
| 86 const std::vector<CrxUpdateItem*>& items_to_check, | 86 const std::vector<CrxUpdateItem*>& items_to_check, |
| 87 const std::string& additional_attributes, | 87 const std::string& additional_attributes, |
| 88 const UpdateCheckCallback& update_check_callback) OVERRIDE; | 88 const UpdateCheckCallback& update_check_callback) override; |
| 89 | 89 |
| 90 private: | 90 private: |
| 91 void OnRequestSenderComplete(const net::URLFetcher* source); | 91 void OnRequestSenderComplete(const net::URLFetcher* source); |
| 92 | 92 |
| 93 const Configurator& config_; | 93 const Configurator& config_; |
| 94 UpdateCheckCallback update_check_callback_; | 94 UpdateCheckCallback update_check_callback_; |
| 95 scoped_ptr<RequestSender> request_sender_; | 95 scoped_ptr<RequestSender> request_sender_; |
| 96 | 96 |
| 97 base::ThreadChecker thread_checker_; | 97 base::ThreadChecker thread_checker_; |
| 98 | 98 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 original_url, error, error_message, update_response.results()); | 158 original_url, error, error_message, update_response.results()); |
| 159 } | 159 } |
| 160 | 160 |
| 161 } // namespace | 161 } // namespace |
| 162 | 162 |
| 163 scoped_ptr<UpdateChecker> UpdateChecker::Create(const Configurator& config) { | 163 scoped_ptr<UpdateChecker> UpdateChecker::Create(const Configurator& config) { |
| 164 return scoped_ptr<UpdateChecker>(new UpdateCheckerImpl(config)); | 164 return scoped_ptr<UpdateChecker>(new UpdateCheckerImpl(config)); |
| 165 } | 165 } |
| 166 | 166 |
| 167 } // namespace component_updater | 167 } // namespace component_updater |
| OLD | NEW |