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 <urlmon.h> | 7 #include <urlmon.h> |
8 #include <wininet.h> | 8 #include <wininet.h> |
9 | 9 |
10 #include "base/callback_old.h" | 10 #include "base/callback_old.h" |
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 } else if (LowerCaseEqualsASCII(method(), "put")) { | 462 } else if (LowerCaseEqualsASCII(method(), "put")) { |
463 bind_info->dwBindVerb = BINDVERB_PUT; | 463 bind_info->dwBindVerb = BINDVERB_PUT; |
464 } else { | 464 } else { |
465 std::wstring verb(ASCIIToWide(StringToUpperASCII(method()))); | 465 std::wstring verb(ASCIIToWide(StringToUpperASCII(method()))); |
466 bind_info->dwBindVerb = BINDVERB_CUSTOM; | 466 bind_info->dwBindVerb = BINDVERB_CUSTOM; |
467 bind_info->szCustomVerb = reinterpret_cast<wchar_t*>( | 467 bind_info->szCustomVerb = reinterpret_cast<wchar_t*>( |
468 ::CoTaskMemAlloc((verb.length() + 1) * sizeof(wchar_t))); | 468 ::CoTaskMemAlloc((verb.length() + 1) * sizeof(wchar_t))); |
469 lstrcpyW(bind_info->szCustomVerb, verb.c_str()); | 469 lstrcpyW(bind_info->szCustomVerb, verb.c_str()); |
470 } | 470 } |
471 | 471 |
472 if (bind_info->dwBindVerb = BINDVERB_POST || | 472 if (bind_info->dwBindVerb == BINDVERB_POST || |
473 bind_info->dwBindVerb == BINDVERB_PUT) { | 473 bind_info->dwBindVerb == BINDVERB_PUT) { |
474 // Bypass caching proxies on upload requests and avoid writing responses to | 474 // Bypass caching proxies on upload requests and avoid writing responses to |
475 // the browser's cache. | 475 // the browser's cache. |
476 *bind_flags |= BINDF_GETNEWESTVERSION | BINDF_PRAGMA_NO_CACHE; | 476 *bind_flags |= BINDF_GETNEWESTVERSION | BINDF_PRAGMA_NO_CACHE; |
477 | 477 |
478 // Attempt to avoid storing the response for upload requests. | 478 // Attempt to avoid storing the response for upload requests. |
479 // See http://crbug.com/55918 | 479 // See http://crbug.com/55918 |
480 if (resource_type_ != ResourceType::MAIN_FRAME) | 480 if (resource_type_ != ResourceType::MAIN_FRAME) |
481 *bind_flags |= BINDF_NOWRITECACHE; | 481 *bind_flags |= BINDF_NOWRITECACHE; |
482 | 482 |
(...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1269 privacy_info_.privacy_records[UTF8ToWide(url)]; | 1269 privacy_info_.privacy_records[UTF8ToWide(url)]; |
1270 | 1270 |
1271 privacy_entry.flags |= flags; | 1271 privacy_entry.flags |= flags; |
1272 privacy_entry.policy_ref = UTF8ToWide(policy_ref); | 1272 privacy_entry.policy_ref = UTF8ToWide(policy_ref); |
1273 | 1273 |
1274 if (fire_privacy_event && IsWindow(notification_window_)) { | 1274 if (fire_privacy_event && IsWindow(notification_window_)) { |
1275 PostMessage(notification_window_, WM_FIRE_PRIVACY_CHANGE_NOTIFICATION, 1, | 1275 PostMessage(notification_window_, WM_FIRE_PRIVACY_CHANGE_NOTIFICATION, 1, |
1276 0); | 1276 0); |
1277 } | 1277 } |
1278 } | 1278 } |
OLD | NEW |