Fix some build symbol configuration.
[chromium-blink-merge.git] / components / update_client / action_update_check.h
blobb5f1d2437923d8f83ea6b67f4f4e8ae11a373e52
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
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_UPDATE_CLIENT_ACTION_UPDATE_CHECK_H_
6 #define COMPONENTS_UPDATE_CLIENT_ACTION_UPDATE_CHECK_H_
8 #include <map>
9 #include <string>
10 #include <vector>
12 #include "base/macros.h"
13 #include "base/memory/scoped_ptr.h"
14 #include "base/threading/thread_checker.h"
15 #include "base/version.h"
16 #include "components/update_client/action.h"
17 #include "components/update_client/crx_update_item.h"
18 #include "components/update_client/update_client.h"
19 #include "components/update_client/update_engine.h"
20 #include "components/update_client/update_response.h"
21 #include "url/gurl.h"
23 namespace update_client {
25 class UpdateChecker;
27 // Implements an update check for the CRXs in an update context.
28 class ActionUpdateCheck : public Action, private ActionImpl {
29 public:
30 ActionUpdateCheck(scoped_ptr<UpdateChecker> update_checker,
31 const base::Version& browser_version,
32 const std::string& extra_request_parameters);
34 ~ActionUpdateCheck() override;
36 void Run(UpdateContext* update_context, Callback callback) override;
38 private:
39 void UpdateCheckComplete(const GURL& original_url,
40 int error,
41 const std::string& error_message,
42 const UpdateResponse::Results& results);
44 void OnUpdateCheckSucceeded(const UpdateResponse::Results& results);
45 void OnUpdateCheckFailed(int error, const std::string& error_message);
47 scoped_ptr<UpdateChecker> update_checker_;
48 const base::Version browser_version_;
49 const std::string extra_request_parameters_;
51 DISALLOW_COPY_AND_ASSIGN(ActionUpdateCheck);
54 } // namespace update_client
56 #endif // COMPONENTS_UPDATE_CLIENT_ACTION_UPDATE_CHECK_H_