Cast: Stop logging kVideoFrameSentToEncoder and rename a couple events.
[chromium-blink-merge.git] / chrome / browser / component_updater / update_checker.h
blobb43e2fc23a5ea44eb8f7fb66489c354618c7cdf7
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_COMPONENT_UPDATER_UPDATE_CHECKER_H_
6 #define CHROME_BROWSER_COMPONENT_UPDATER_UPDATE_CHECKER_H_
8 #include <string>
9 #include <vector>
11 #include "base/basictypes.h"
12 #include "base/callback.h"
13 #include "base/memory/scoped_ptr.h"
14 #include "chrome/browser/component_updater/update_response.h"
16 class GURL;
18 namespace net {
19 class URLRequestContextGetter;
22 namespace component_updater {
24 struct CrxUpdateItem;
26 class UpdateChecker {
27 public:
28 typedef base::Callback<void(int error,
29 const std::string& error_message,
30 const UpdateResponse::Results& results)>
31 UpdateCheckCallback;
33 virtual ~UpdateChecker() {}
35 // Initiates an update check for the |items_to_check|. |additional_attributes|
36 // provides a way to customize the <request> element. This value is inserted
37 // as-is, therefore it must be well-formed as an XML attribute string.
38 virtual bool CheckForUpdates(
39 const std::vector<CrxUpdateItem*>& items_to_check,
40 const std::string& additional_attributes) = 0;
42 static scoped_ptr<UpdateChecker> Create(
43 const GURL& url,
44 net::URLRequestContextGetter* url_request_context_getter,
45 const UpdateCheckCallback& update_check_callback);
47 protected:
48 UpdateChecker() {}
50 private:
51 DISALLOW_COPY_AND_ASSIGN(UpdateChecker);
54 } // namespace component_updater
56 #endif // CHROME_BROWSER_COMPONENT_UPDATER_UPDATE_CHECKER_H_