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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 } | 281 } |
282 | 282 |
283 switch (status_code) { | 283 switch (status_code) { |
284 case BINDSTATUS_REDIRECTING: { | 284 case BINDSTATUS_REDIRECTING: { |
285 // If we receive a redirect for the initial pending request initiated | 285 // If we receive a redirect for the initial pending request initiated |
286 // when our document loads we should stash it away and inform Chrome | 286 // when our document loads we should stash it away and inform Chrome |
287 // accordingly when it requests data for the original URL. | 287 // accordingly when it requests data for the original URL. |
288 ScopedComPtr<BindContextInfo> info; | 288 ScopedComPtr<BindContextInfo> info; |
289 BindContextInfo::FromBindContext(bind_context_, info.Receive()); | 289 BindContextInfo::FromBindContext(bind_context_, info.Receive()); |
290 DCHECK(info); | 290 DCHECK(info); |
291 GURL previously_redirected(info ? info->url() : std::wstring()); | 291 GURL previously_redirected(info ? info->GetUrl() : std::wstring()); |
292 if (GURL(status_text) != previously_redirected) { | 292 if (GURL(status_text) != previously_redirected) { |
293 DVLOG(1) << __FUNCTION__ << me() << "redirect from " << url() | 293 DVLOG(1) << __FUNCTION__ << me() << "redirect from " << url() |
294 << " to " << status_text; | 294 << " to " << status_text; |
295 // Fetch the redirect status as they aren't all equal (307 in particular | 295 // Fetch the redirect status as they aren't all equal (307 in particular |
296 // retains the HTTP request verb). | 296 // retains the HTTP request verb). |
297 int http_code = GetHttpResponseStatusFromBinding(binding_); | 297 int http_code = GetHttpResponseStatusFromBinding(binding_); |
298 status_.SetRedirected(http_code, WideToUTF8(status_text)); | 298 status_.SetRedirected(http_code, WideToUTF8(status_text)); |
299 // Abort. We will inform Chrome in OnStopBinding callback. | 299 // Abort. We will inform Chrome in OnStopBinding callback. |
300 binding_->Abort(); | 300 binding_->Abort(); |
301 return E_ABORT; | 301 return E_ABORT; |
(...skipping 936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1238 privacy_info_.privacy_records[UTF8ToWide(url)]; | 1238 privacy_info_.privacy_records[UTF8ToWide(url)]; |
1239 | 1239 |
1240 privacy_entry.flags |= flags; | 1240 privacy_entry.flags |= flags; |
1241 privacy_entry.policy_ref = UTF8ToWide(policy_ref); | 1241 privacy_entry.policy_ref = UTF8ToWide(policy_ref); |
1242 | 1242 |
1243 if (fire_privacy_event && IsWindow(notification_window_)) { | 1243 if (fire_privacy_event && IsWindow(notification_window_)) { |
1244 PostMessage(notification_window_, WM_FIRE_PRIVACY_CHANGE_NOTIFICATION, 1, | 1244 PostMessage(notification_window_, WM_FIRE_PRIVACY_CHANGE_NOTIFICATION, 1, |
1245 0); | 1245 0); |
1246 } | 1246 } |
1247 } | 1247 } |
OLD | NEW |