| 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/callback_forward.h" | 8 #include "base/callback_forward.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 UpdateCheckDelegate() {} | 87 UpdateCheckDelegate() {} |
| 88 }; | 88 }; |
| 89 | 89 |
| 90 // Begins an asynchronous update check on |task_runner|. If a new version is | 90 // 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 | 91 // available and |install_update_if_possible| is true, the new version will be |
| 92 // automatically downloaded and installed. |elevation_window| is the window | 92 // automatically downloaded and installed. |elevation_window| is the window |
| 93 // which should own any necessary elevation UI. Methods on |delegate| will be | 93 // which should own any necessary elevation UI. Methods on |delegate| will be |
| 94 // invoked on the caller's thread to provide feedback on the operation, with | 94 // invoked on the caller's thread to provide feedback on the operation, with |
| 95 // messages localized to |locale| if possible. | 95 // messages localized to |locale| if possible. |
| 96 void BeginUpdateCheck( | 96 void BeginUpdateCheck( |
| 97 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, | 97 scoped_refptr<base::SingleThreadTaskRunner> task_runner, |
| 98 const std::string& locale, | 98 const std::string& locale, |
| 99 bool install_update_if_possible, | 99 bool install_update_if_possible, |
| 100 gfx::AcceleratedWidget elevation_window, | 100 gfx::AcceleratedWidget elevation_window, |
| 101 const base::WeakPtr<UpdateCheckDelegate>& delegate); | 101 const base::WeakPtr<UpdateCheckDelegate>& delegate); |
| 102 | 102 |
| 103 // A type of callback supplied by tests to provide a custom IGoogleUpdate3Web | 103 // A type of callback supplied by tests to provide a custom IGoogleUpdate3Web |
| 104 // implementation (see src/google_update/google_update_idl.idl). | 104 // implementation (see src/google_update/google_update_idl.idl). |
| 105 typedef base::Callback<HRESULT(base::win::ScopedComPtr<IGoogleUpdate3Web>*)> | 105 typedef base::Callback<HRESULT(base::win::ScopedComPtr<IGoogleUpdate3Web>*)> |
| 106 GoogleUpdate3ClassFactory; | 106 GoogleUpdate3ClassFactory; |
| 107 | 107 |
| 108 // For use by tests that wish to provide a custom IGoogleUpdate3Web | 108 // For use by tests that wish to provide a custom IGoogleUpdate3Web |
| 109 // implementation independent of Google Update's. | 109 // implementation independent of Google Update's. |
| 110 void SetGoogleUpdateFactoryForTesting( | 110 void SetGoogleUpdateFactoryForTesting( |
| 111 const GoogleUpdate3ClassFactory& google_update_factory); | 111 const GoogleUpdate3ClassFactory& google_update_factory); |
| 112 | 112 |
| 113 #endif // CHROME_BROWSER_GOOGLE_GOOGLE_UPDATE_WIN_H_ | 113 #endif // CHROME_BROWSER_GOOGLE_GOOGLE_UPDATE_WIN_H_ |
| OLD | NEW |