OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_frame/urlmon_bind_status_callback.h" | 5 #include "chrome_frame/urlmon_bind_status_callback.h" |
6 | 6 |
7 #include <mshtml.h> | 7 #include <mshtml.h> |
8 #include <shlguid.h> | 8 #include <shlguid.h> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 << base::StringPrintf(" status=%i tid=%i %ls", status_code, | 242 << base::StringPrintf(" status=%i tid=%i %ls", status_code, |
243 base::PlatformThread::CurrentId(), | 243 base::PlatformThread::CurrentId(), |
244 status_text); | 244 status_text); |
245 // Report all crashes in the exception handler if we wrap the callback. | 245 // Report all crashes in the exception handler if we wrap the callback. |
246 // Note that this avoids having the VEH report a crash if an SEH earlier in | 246 // Note that this avoids having the VEH report a crash if an SEH earlier in |
247 // the chain handles the exception. | 247 // the chain handles the exception. |
248 ExceptionBarrier barrier; | 248 ExceptionBarrier barrier; |
249 | 249 |
250 HRESULT hr = S_OK; | 250 HRESULT hr = S_OK; |
251 | 251 |
252 // Remember the last redirected URL in case we get switched into | 252 // TODO(ananta) |
253 // chrome frame | 253 // ChromeFrame will not be informed of any redirects which occur while we |
254 if (status_code == BINDSTATUS_REDIRECTING) { | 254 // switch into Chrome. This will only break the moniker patch which is |
255 ScopedComPtr<BindContextInfo> info; | 255 // legacy and needs to be deleted. |
256 BindContextInfo::FromBindContext(bind_ctx_, info.Receive()); | |
257 DCHECK(info); | |
258 if (info) | |
259 info->set_url(status_text); | |
260 } | |
261 | 256 |
262 if (ShouldCacheProgress(status_code)) { | 257 if (ShouldCacheProgress(status_code)) { |
263 saved_progress_.push_back(new Progress(progress, progress_max, status_code, | 258 saved_progress_.push_back(new Progress(progress, progress_max, status_code, |
264 status_text)); | 259 status_text)); |
265 } else { | 260 } else { |
266 hr = CallbackImpl::OnProgress(progress, progress_max, status_code, | 261 hr = CallbackImpl::OnProgress(progress, progress_max, status_code, |
267 status_text); | 262 status_text); |
268 } | 263 } |
269 | 264 |
270 return hr; | 265 return hr; |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
423 case BINDSTATUS_CACHEFILENAMEAVAILABLE: | 418 case BINDSTATUS_CACHEFILENAMEAVAILABLE: |
424 case BINDSTATUS_SERVER_MIMETYPEAVAILABLE: | 419 case BINDSTATUS_SERVER_MIMETYPEAVAILABLE: |
425 return true; | 420 return true; |
426 default: | 421 default: |
427 break; | 422 break; |
428 } | 423 } |
429 } | 424 } |
430 | 425 |
431 return false; | 426 return false; |
432 } | 427 } |
OLD | NEW |