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

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

Issue 2390583002: [WIP] WebFonts cache-aware timeout adaption (Closed)
Patch Set: check ERR_CACHE_MISS directly in ResourceError Created 4 years, 1 month 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
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) 2006 Samuel Weinig <sam.weinig@gmail.com> 3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
4 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. 4 * Copyright (C) 2009, 2012 Google Inc. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 InputToLoadPerfMetricReportPolicy inputPerfMetricReportPolicy) { 301 InputToLoadPerfMetricReportPolicy inputPerfMetricReportPolicy) {
302 m_inputPerfMetricReportPolicy = inputPerfMetricReportPolicy; 302 m_inputPerfMetricReportPolicy = inputPerfMetricReportPolicy;
303 } 303 }
304 304
305 void setRedirectStatus(RedirectStatus status) { m_redirectStatus = status; } 305 void setRedirectStatus(RedirectStatus status) { m_redirectStatus = status; }
306 RedirectStatus redirectStatus() const { return m_redirectStatus; } 306 RedirectStatus redirectStatus() const { return m_redirectStatus; }
307 307
308 void setNavigationStartTime(double); 308 void setNavigationStartTime(double);
309 double navigationStartTime() const { return m_navigationStart; } 309 double navigationStartTime() const { return m_navigationStart; }
310 310
311 bool isCacheAwareLoadingActivated() const {
312 return m_isCacheAwareLoadingActivated;
313 }
314
315 static bool isCacheAwareLoadingSupported(WebCachePolicy);
316 void mayActivateCacheAwareLoading();
317 void deactivateCacheAwareLoading();
318
311 private: 319 private:
312 void initialize(const KURL&); 320 void initialize(const KURL&);
313 321
314 const CacheControlHeader& cacheControlHeader() const; 322 const CacheControlHeader& cacheControlHeader() const;
315 323
316 KURL m_url; 324 KURL m_url;
317 WebCachePolicy m_cachePolicy; 325 WebCachePolicy m_cachePolicy;
318 double m_timeoutInterval; // 0 is a magic value for platform default on 326 double m_timeoutInterval; // 0 is a magic value for platform default on
319 // platforms that have one. 327 // platforms that have one.
320 KURL m_firstPartyForCookies; 328 KURL m_firstPartyForCookies;
(...skipping 21 matching lines...) Expand all
342 WebURLRequest::FetchRequestMode m_fetchRequestMode; 350 WebURLRequest::FetchRequestMode m_fetchRequestMode;
343 WebURLRequest::FetchCredentialsMode m_fetchCredentialsMode; 351 WebURLRequest::FetchCredentialsMode m_fetchCredentialsMode;
344 WebURLRequest::FetchRedirectMode m_fetchRedirectMode; 352 WebURLRequest::FetchRedirectMode m_fetchRedirectMode;
345 WebURLRequest::LoFiState m_loFiState; 353 WebURLRequest::LoFiState m_loFiState;
346 ReferrerPolicy m_referrerPolicy; 354 ReferrerPolicy m_referrerPolicy;
347 bool m_didSetHTTPReferrer; 355 bool m_didSetHTTPReferrer;
348 bool m_checkForBrowserSideNavigation; 356 bool m_checkForBrowserSideNavigation;
349 double m_uiStartTime; 357 double m_uiStartTime;
350 bool m_isExternalRequest; 358 bool m_isExternalRequest;
351 InputToLoadPerfMetricReportPolicy m_inputPerfMetricReportPolicy; 359 InputToLoadPerfMetricReportPolicy m_inputPerfMetricReportPolicy;
360 bool m_isCacheAwareLoadingActivated;
361 WebCachePolicy m_savedCachePolicy;
352 362
353 mutable CacheControlHeader m_cacheControlHeaderCache; 363 mutable CacheControlHeader m_cacheControlHeaderCache;
354 364
355 static double s_defaultTimeoutInterval; 365 static double s_defaultTimeoutInterval;
356 366
357 RedirectStatus m_redirectStatus; 367 RedirectStatus m_redirectStatus;
358 368
359 double m_navigationStart = 0; 369 double m_navigationStart = 0;
360 }; 370 };
361 371
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 WebURLRequest::FetchRequestMode m_fetchRequestMode; 403 WebURLRequest::FetchRequestMode m_fetchRequestMode;
394 WebURLRequest::FetchCredentialsMode m_fetchCredentialsMode; 404 WebURLRequest::FetchCredentialsMode m_fetchCredentialsMode;
395 WebURLRequest::FetchRedirectMode m_fetchRedirectMode; 405 WebURLRequest::FetchRedirectMode m_fetchRedirectMode;
396 WebURLRequest::LoFiState m_loFiState; 406 WebURLRequest::LoFiState m_loFiState;
397 ReferrerPolicy m_referrerPolicy; 407 ReferrerPolicy m_referrerPolicy;
398 bool m_didSetHTTPReferrer; 408 bool m_didSetHTTPReferrer;
399 bool m_checkForBrowserSideNavigation; 409 bool m_checkForBrowserSideNavigation;
400 double m_uiStartTime; 410 double m_uiStartTime;
401 bool m_isExternalRequest; 411 bool m_isExternalRequest;
402 InputToLoadPerfMetricReportPolicy m_inputPerfMetricReportPolicy; 412 InputToLoadPerfMetricReportPolicy m_inputPerfMetricReportPolicy;
413 bool m_isCacheAwareLoadingActivated;
414 WebCachePolicy m_savedCachePolicy;
403 ResourceRequest::RedirectStatus m_redirectStatus; 415 ResourceRequest::RedirectStatus m_redirectStatus;
404 }; 416 };
405 417
406 } // namespace blink 418 } // namespace blink
407 419
408 #endif // ResourceRequest_h 420 #endif // ResourceRequest_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698