Chromium Code Reviews| Index: chrome/browser/component_updater/component_patcher_operation_out_of_process.h |
| diff --git a/chrome/browser/component_updater/update_checker.h b/chrome/browser/component_updater/component_patcher_operation_out_of_process.h |
| similarity index 19% |
| copy from chrome/browser/component_updater/update_checker.h |
| copy to chrome/browser/component_updater/component_patcher_operation_out_of_process.h |
| index 9f2286ff6e67b87d2378c699cf66004d4e7f2aef..4ff8c9a02649f6a6d04b1916b22da54240ba996d 100644 |
| --- a/chrome/browser/component_updater/update_checker.h |
| +++ b/chrome/browser/component_updater/component_patcher_operation_out_of_process.h |
| @@ -2,55 +2,40 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#ifndef CHROME_BROWSER_COMPONENT_UPDATER_UPDATE_CHECKER_H_ |
| -#define CHROME_BROWSER_COMPONENT_UPDATER_UPDATE_CHECKER_H_ |
| +#ifndef CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_PATCHER_OPERATION_OUT_OF_PROCESS_H_ |
| +#define CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_PATCHER_OPERATION_OUT_OF_PROCESS_H_ |
| #include <string> |
| -#include <vector> |
| #include "base/basictypes.h" |
| -#include "base/callback.h" |
| -#include "base/memory/scoped_ptr.h" |
| -#include "chrome/browser/component_updater/update_response.h" |
| - |
| -class GURL; |
| - |
| -namespace net { |
| -class URLRequestContextGetter; |
| -} |
| +#include "base/callback_forward.h" |
| +#include "chrome/browser/component_updater/component_patcher_operation.h" |
| namespace component_updater { |
| -class Configurator; |
| -struct CrxUpdateItem; |
| +class DeltaUpdateOpPatchHost; |
| -class UpdateChecker { |
| +// Implements the DeltaUpdateOpPatch out-of-process patching. |
| +class ChromeOutOfProcessPatcher : public OutOfProcessPatcher { |
| public: |
| - typedef base::Callback<void(int error, |
| - const std::string& error_message, |
| - const UpdateResponse::Results& results)> |
| - UpdateCheckCallback; |
| - |
| - virtual ~UpdateChecker() {} |
| + ChromeOutOfProcessPatcher(); |
| - // Initiates an update check for the |items_to_check|. |additional_attributes| |
| - // provides a way to customize the <request> element. This value is inserted |
| - // as-is, therefore it must be well-formed as an XML attribute string. |
| - virtual bool CheckForUpdates( |
| - const std::vector<CrxUpdateItem*>& items_to_check, |
| - const std::string& additional_attributes) = 0; |
| + // DeltaUpdateOpPatch::OutOfProcessPatcher implementation. |
| + virtual void Patch(const std::string& operation, |
| + scoped_refptr<base::SequencedTaskRunner> task_runner, |
| + base::FilePath& input_abs_path, |
| + base::FilePath& patch_abs_path, |
| + base::FilePath& output_abs_path, |
| + base::Callback<void(int result)> callback) OVERRIDE; |
| - static scoped_ptr<UpdateChecker> Create( |
| - const Configurator& config, |
| - const UpdateCheckCallback& update_check_callback); |
| + private: |
| + virtual ~ChromeOutOfProcessPatcher(); |
| - protected: |
| - UpdateChecker() {} |
| + scoped_refptr<DeltaUpdateOpPatchHost> host_; |
|
waffles
2014/07/31 21:54:26
Can we relax this to a scoped_refptr<content::Util
tommycli
2014/08/04 20:25:14
This didn't work, as I needed to Bind to a PatchHo
|
| - private: |
| - DISALLOW_COPY_AND_ASSIGN(UpdateChecker); |
| + DISALLOW_COPY_AND_ASSIGN(ChromeOutOfProcessPatcher); |
| }; |
| } // namespace component_updater |
| -#endif // CHROME_BROWSER_COMPONENT_UPDATER_UPDATE_CHECKER_H_ |
| +#endif // CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_PATCHER_OPERATION_OUT_OF_PROCESS_H_ |