OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_GOOGLE_GOOGLE_UPDATE_WIN_H_ | 5 #ifndef CHROME_BROWSER_GOOGLE_GOOGLE_UPDATE_WIN_H_ |
6 #define CHROME_BROWSER_GOOGLE_GOOGLE_UPDATE_WIN_H_ | 6 #define CHROME_BROWSER_GOOGLE_GOOGLE_UPDATE_WIN_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/callback_forward.h" | 9 #include "base/callback_forward.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 // BeginUpdateCheck is called with |install_update_if_possible| == true. | 69 // BeginUpdateCheck is called with |install_update_if_possible| == true. |
70 virtual void OnUpgradeProgress(int progress, | 70 virtual void OnUpgradeProgress(int progress, |
71 const base::string16& new_version) = 0; | 71 const base::string16& new_version) = 0; |
72 | 72 |
73 // Invoked following a successful upgrade. |new_version| indicates the version | 73 // Invoked following a successful upgrade. |new_version| indicates the version |
74 // to which Chrome was updated. This method will only be invoked when | 74 // to which Chrome was updated. This method will only be invoked when |
75 // BeginUpdateCheck is called with |install_update_if_possible| == true. | 75 // BeginUpdateCheck is called with |install_update_if_possible| == true. |
76 virtual void OnUpgradeComplete(const base::string16& new_version) = 0; | 76 virtual void OnUpgradeComplete(const base::string16& new_version) = 0; |
77 | 77 |
78 // Invoked following an unrecoverable error, indicated by |error_code|. | 78 // Invoked following an unrecoverable error, indicated by |error_code|. |
79 // |error_message|, if not empty, contains a localized string that may be | 79 // |html_error_message|, if not empty, must be a localized string containing |
80 // presented to the user explaining the nature of the error. |new_version|, if | 80 // all information required by users to act on the error as well as for |
81 // not empty, indicates the version to which an upgrade attempt was made. | 81 // support staff to diagnose it (i.e. |error_code| and any other related |
| 82 // state information). |new_version|, if not empty, indicates the version |
| 83 // to which an upgrade attempt was made. |
82 virtual void OnError(GoogleUpdateErrorCode error_code, | 84 virtual void OnError(GoogleUpdateErrorCode error_code, |
83 const base::string16& error_message, | 85 const base::string16& html_error_message, |
84 const base::string16& new_version) = 0; | 86 const base::string16& new_version) = 0; |
85 | 87 |
86 protected: | 88 protected: |
87 UpdateCheckDelegate() {} | 89 UpdateCheckDelegate() {} |
88 }; | 90 }; |
89 | 91 |
90 // Begins an asynchronous update check on |task_runner|. If a new version is | 92 // Begins an asynchronous update check on |task_runner|. If a new version is |
91 // available and |install_update_if_possible| is true, the new version will be | 93 // available and |install_update_if_possible| is true, the new version will be |
92 // automatically downloaded and installed. |elevation_window| is the window | 94 // automatically downloaded and installed. |elevation_window| is the window |
93 // which should own any necessary elevation UI. Methods on |delegate| will be | 95 // which should own any necessary elevation UI. Methods on |delegate| will be |
(...skipping 10 matching lines...) Expand all Loading... |
104 // implementation (see src/google_update/google_update_idl.idl). | 106 // implementation (see src/google_update/google_update_idl.idl). |
105 typedef base::Callback<HRESULT(base::win::ScopedComPtr<IGoogleUpdate3Web>*)> | 107 typedef base::Callback<HRESULT(base::win::ScopedComPtr<IGoogleUpdate3Web>*)> |
106 GoogleUpdate3ClassFactory; | 108 GoogleUpdate3ClassFactory; |
107 | 109 |
108 // For use by tests that wish to provide a custom IGoogleUpdate3Web | 110 // For use by tests that wish to provide a custom IGoogleUpdate3Web |
109 // implementation independent of Google Update's. | 111 // implementation independent of Google Update's. |
110 void SetGoogleUpdateFactoryForTesting( | 112 void SetGoogleUpdateFactoryForTesting( |
111 const GoogleUpdate3ClassFactory& google_update_factory); | 113 const GoogleUpdate3ClassFactory& google_update_factory); |
112 | 114 |
113 #endif // CHROME_BROWSER_GOOGLE_GOOGLE_UPDATE_WIN_H_ | 115 #endif // CHROME_BROWSER_GOOGLE_GOOGLE_UPDATE_WIN_H_ |
OLD | NEW |