| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_url_request.h" | 5 #include "chrome_frame/urlmon_url_request.h" |
| 6 | 6 |
| 7 #include <wininet.h> | 7 #include <wininet.h> |
| 8 #include <urlmon.h> | 8 #include <urlmon.h> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 } | 282 } |
| 283 | 283 |
| 284 switch (status_code) { | 284 switch (status_code) { |
| 285 case BINDSTATUS_REDIRECTING: { | 285 case BINDSTATUS_REDIRECTING: { |
| 286 // If we receive a redirect for the initial pending request initiated | 286 // If we receive a redirect for the initial pending request initiated |
| 287 // when our document loads we should stash it away and inform Chrome | 287 // when our document loads we should stash it away and inform Chrome |
| 288 // accordingly when it requests data for the original URL. | 288 // accordingly when it requests data for the original URL. |
| 289 ScopedComPtr<BindContextInfo> info; | 289 ScopedComPtr<BindContextInfo> info; |
| 290 BindContextInfo::FromBindContext(bind_context_, info.Receive()); | 290 BindContextInfo::FromBindContext(bind_context_, info.Receive()); |
| 291 DCHECK(info); | 291 DCHECK(info); |
| 292 GURL previously_redirected(info ? info->url() : std::wstring()); | 292 GURL previously_redirected(info ? info->GetUrl() : std::wstring()); |
| 293 if (GURL(status_text) != previously_redirected) { | 293 if (GURL(status_text) != previously_redirected) { |
| 294 DVLOG(1) << __FUNCTION__ << me() << "redirect from " << url() | 294 DVLOG(1) << __FUNCTION__ << me() << "redirect from " << url() |
| 295 << " to " << status_text; | 295 << " to " << status_text; |
| 296 // Fetch the redirect status as they aren't all equal (307 in particular | 296 // Fetch the redirect status as they aren't all equal (307 in particular |
| 297 // retains the HTTP request verb). | 297 // retains the HTTP request verb). |
| 298 int http_code = GetHttpResponseStatusFromBinding(binding_); | 298 int http_code = GetHttpResponseStatusFromBinding(binding_); |
| 299 status_.SetRedirected(http_code, WideToUTF8(status_text)); | 299 status_.SetRedirected(http_code, WideToUTF8(status_text)); |
| 300 // Abort. We will inform Chrome in OnStopBinding callback. | 300 // Abort. We will inform Chrome in OnStopBinding callback. |
| 301 binding_->Abort(); | 301 binding_->Abort(); |
| 302 return E_ABORT; | 302 return E_ABORT; |
| (...skipping 940 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1243 privacy_info_.privacy_records[UTF8ToWide(url)]; | 1243 privacy_info_.privacy_records[UTF8ToWide(url)]; |
| 1244 | 1244 |
| 1245 privacy_entry.flags |= flags; | 1245 privacy_entry.flags |= flags; |
| 1246 privacy_entry.policy_ref = UTF8ToWide(policy_ref); | 1246 privacy_entry.policy_ref = UTF8ToWide(policy_ref); |
| 1247 | 1247 |
| 1248 if (fire_privacy_event && IsWindow(notification_window_)) { | 1248 if (fire_privacy_event && IsWindow(notification_window_)) { |
| 1249 PostMessage(notification_window_, WM_FIRE_PRIVACY_CHANGE_NOTIFICATION, 1, | 1249 PostMessage(notification_window_, WM_FIRE_PRIVACY_CHANGE_NOTIFICATION, 1, |
| 1250 0); | 1250 0); |
| 1251 } | 1251 } |
| 1252 } | 1252 } |
| OLD | NEW |