Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(220)

Side by Side Diff: third_party/WebKit/Source/platform/network/ResourceRequest.cpp

Issue 1987973002: Reload cache control: remove redundant header insertion from Blink Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: (just rebase to see bots' results again) Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003, 2006 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2003, 2006 Apple Computer, Inc. All rights reserved.
3 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2009, 2012 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 375
376 const CacheControlHeader& ResourceRequest::cacheControlHeader() const 376 const CacheControlHeader& ResourceRequest::cacheControlHeader() const
377 { 377 {
378 if (!m_cacheControlHeaderCache.parsed) 378 if (!m_cacheControlHeaderCache.parsed)
379 m_cacheControlHeaderCache = parseCacheControlDirectives(m_httpHeaderFiel ds.get(HTTPNames::Cache_Control), m_httpHeaderFields.get(HTTPNames::Pragma)); 379 m_cacheControlHeaderCache = parseCacheControlDirectives(m_httpHeaderFiel ds.get(HTTPNames::Cache_Control), m_httpHeaderFields.get(HTTPNames::Pragma));
380 return m_cacheControlHeaderCache; 380 return m_cacheControlHeaderCache;
381 } 381 }
382 382
383 bool ResourceRequest::cacheControlContainsNoCache() const 383 bool ResourceRequest::cacheControlContainsNoCache() const
384 { 384 {
385 return cacheControlHeader().containsNoCache; 385 return cacheControlHeader().containsNoCache || getCachePolicy() == WebCacheP olicy::BypassingCache;
386 } 386 }
387 387
388 bool ResourceRequest::cacheControlContainsNoStore() const 388 bool ResourceRequest::cacheControlContainsNoStore() const
389 { 389 {
390 return cacheControlHeader().containsNoStore; 390 return cacheControlHeader().containsNoStore;
391 } 391 }
392 392
393 bool ResourceRequest::hasCacheValidatorFields() const 393 bool ResourceRequest::hasCacheValidatorFields() const
394 { 394 {
395 return !m_httpHeaderFields.get(HTTPNames::Last_Modified).isEmpty() || !m_htt pHeaderFields.get(HTTPNames::ETag).isEmpty(); 395 return !m_httpHeaderFields.get(HTTPNames::Last_Modified).isEmpty() || !m_htt pHeaderFields.get(HTTPNames::ETag).isEmpty();
(...skipping 28 matching lines...) Expand all
424 m_didSetHTTPReferrer = false; 424 m_didSetHTTPReferrer = false;
425 m_checkForBrowserSideNavigation = true; 425 m_checkForBrowserSideNavigation = true;
426 m_uiStartTime = 0; 426 m_uiStartTime = 0;
427 m_isExternalRequest = false; 427 m_isExternalRequest = false;
428 m_inputPerfMetricReportPolicy = InputToLoadPerfMetricReportPolicy::NoReport; 428 m_inputPerfMetricReportPolicy = InputToLoadPerfMetricReportPolicy::NoReport;
429 m_redirectStatus = RedirectStatus::NoRedirect; 429 m_redirectStatus = RedirectStatus::NoRedirect;
430 m_requestorOrigin = SecurityOrigin::createUnique(); 430 m_requestorOrigin = SecurityOrigin::createUnique();
431 } 431 }
432 432
433 } // namespace blink 433 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698