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.h" | 5 #include "chrome/browser/google/google_update.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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 STDMETHOD(OnWaitingToInstall)() { | 149 STDMETHOD(OnWaitingToInstall)() { |
150 return S_OK; | 150 return S_OK; |
151 } | 151 } |
152 STDMETHOD(OnInstalling)() { | 152 STDMETHOD(OnInstalling)() { |
153 result_ = UPGRADE_STARTED; | 153 result_ = UPGRADE_STARTED; |
154 return S_OK; | 154 return S_OK; |
155 } | 155 } |
156 STDMETHOD(OnPause)() { | 156 STDMETHOD(OnPause)() { |
157 return S_OK; | 157 return S_OK; |
158 } | 158 } |
159 STDMETHOD(OnComplete)(CompletionCodes code, const TCHAR* text) { | 159 STDMETHOD(OnComplete)(LegacyCompletionCodes code, const TCHAR* text) { |
160 switch (code) { | 160 switch (code) { |
161 case COMPLETION_CODE_SUCCESS_CLOSE_UI: | 161 case COMPLETION_CODE_SUCCESS_CLOSE_UI: |
162 case COMPLETION_CODE_SUCCESS: { | 162 case COMPLETION_CODE_SUCCESS: { |
163 if (result_ == UPGRADE_STARTED) | 163 if (result_ == UPGRADE_STARTED) |
164 result_ = UPGRADE_SUCCESSFUL; | 164 result_ = UPGRADE_SUCCESSFUL; |
165 else if (result_ == UPGRADE_CHECK_STARTED) | 165 else if (result_ == UPGRADE_CHECK_STARTED) |
166 result_ = UPGRADE_ALREADY_UP_TO_DATE; | 166 result_ = UPGRADE_ALREADY_UP_TO_DATE; |
167 break; | 167 break; |
168 } | 168 } |
169 case COMPLETION_CODE_ERROR: | 169 case COMPLETION_CODE_ERROR: |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 MessageLoop* main_loop) { | 383 MessageLoop* main_loop) { |
384 NOTREACHED() << "Communication with Google Update failed: " << hr | 384 NOTREACHED() << "Communication with Google Update failed: " << hr |
385 << " error: " << error_code | 385 << " error: " << error_code |
386 << ", message: " << error_message.c_str(); | 386 << ", message: " << error_message.c_str(); |
387 main_loop->PostTask( | 387 main_loop->PostTask( |
388 FROM_HERE, | 388 FROM_HERE, |
389 base::Bind(&GoogleUpdate::ReportResults, this, | 389 base::Bind(&GoogleUpdate::ReportResults, this, |
390 UPGRADE_ERROR, error_code, error_message)); | 390 UPGRADE_ERROR, error_code, error_message)); |
391 return false; | 391 return false; |
392 } | 392 } |
OLD | NEW |