| 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 #include "chrome/browser/google/google_update_win.h" | 5 #include "chrome/browser/google/google_update_win.h" |
| 6 | 6 |
| 7 #include <atlbase.h> | 7 #include <atlbase.h> |
| 8 #include <atlcom.h> | 8 #include <atlcom.h> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 // Returns which version Google Update found on the server (if a more | 166 // Returns which version Google Update found on the server (if a more |
| 167 // recent version was found). Otherwise, this will be blank. | 167 // recent version was found). Otherwise, this will be blank. |
| 168 base::string16 new_version() const { return new_version_; } | 168 base::string16 new_version() const { return new_version_; } |
| 169 | 169 |
| 170 // Returns the Google Update supplied error string that describes the error | 170 // Returns the Google Update supplied error string that describes the error |
| 171 // that occurred during the update check/upgrade. | 171 // that occurred during the update check/upgrade. |
| 172 base::string16 error_message() const { return error_message_; } | 172 base::string16 error_message() const { return error_message_; } |
| 173 | 173 |
| 174 private: | 174 private: |
| 175 // IJobObserver: | 175 // IJobObserver: |
| 176 STDMETHOD(OnShow)(); | 176 STDMETHOD(OnShow)() override; |
| 177 STDMETHOD(OnCheckingForUpdate)(); | 177 STDMETHOD(OnCheckingForUpdate)() override; |
| 178 STDMETHOD(OnUpdateAvailable)(const TCHAR* version_string); | 178 STDMETHOD(OnUpdateAvailable)(const TCHAR* version_string) override; |
| 179 STDMETHOD(OnWaitingToDownload)(); | 179 STDMETHOD(OnWaitingToDownload)() override; |
| 180 STDMETHOD(OnDownloading)(int time_remaining_ms, int pos); | 180 STDMETHOD(OnDownloading)(int time_remaining_ms, int pos) override; |
| 181 STDMETHOD(OnWaitingToInstall)(); | 181 STDMETHOD(OnWaitingToInstall)() override; |
| 182 STDMETHOD(OnInstalling)(); | 182 STDMETHOD(OnInstalling)() override; |
| 183 STDMETHOD(OnPause)(); | 183 STDMETHOD(OnPause)() override; |
| 184 STDMETHOD(OnComplete)(LegacyCompletionCodes code, const TCHAR* text); | 184 STDMETHOD(OnComplete)(LegacyCompletionCodes code, const TCHAR* text) override; |
| 185 STDMETHOD(SetEventSink)(IProgressWndEvents* event_sink); | 185 STDMETHOD(SetEventSink)(IProgressWndEvents* event_sink) override; |
| 186 | 186 |
| 187 // The task runner associated with the thread in which the job runs. | 187 // The task runner associated with the thread in which the job runs. |
| 188 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 188 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
| 189 | 189 |
| 190 // A callback to be run to complete processing; | 190 // A callback to be run to complete processing; |
| 191 base::Closure on_complete_callback_; | 191 base::Closure on_complete_callback_; |
| 192 | 192 |
| 193 // The status/result of the Google Update operation. | 193 // The status/result of the Google Update operation. |
| 194 GoogleUpdateUpgradeResult result_; | 194 GoogleUpdateUpgradeResult result_; |
| 195 | 195 |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 512 const OnDemandAppsClassFactory& google_update_factory) { | 512 const OnDemandAppsClassFactory& google_update_factory) { |
| 513 if (g_google_update_factory) { | 513 if (g_google_update_factory) { |
| 514 delete g_google_update_factory; | 514 delete g_google_update_factory; |
| 515 g_google_update_factory = nullptr; | 515 g_google_update_factory = nullptr; |
| 516 } | 516 } |
| 517 if (!google_update_factory.is_null()) { | 517 if (!google_update_factory.is_null()) { |
| 518 g_google_update_factory = | 518 g_google_update_factory = |
| 519 new OnDemandAppsClassFactory(google_update_factory); | 519 new OnDemandAppsClassFactory(google_update_factory); |
| 520 } | 520 } |
| 521 } | 521 } |
| OLD | NEW |