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

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

Issue 339593005: Set the target type when creating the request for main resource (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Switched to constructors Created 6 years, 5 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 | « Source/platform/network/ResourceRequest.h ('k') | Source/web/FrameLoaderClientImpl.cpp » ('j') | 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 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 m_downloadToFile = false; 367 m_downloadToFile = false;
368 m_priority = ResourceLoadPriorityLow; 368 m_priority = ResourceLoadPriorityLow;
369 m_intraPriorityValue = 0; 369 m_intraPriorityValue = 0;
370 m_requestorID = 0; 370 m_requestorID = 0;
371 m_requestorProcessID = 0; 371 m_requestorProcessID = 0;
372 m_appCacheHostID = 0; 372 m_appCacheHostID = 0;
373 m_targetType = TargetIsUnspecified; 373 m_targetType = TargetIsUnspecified;
374 m_referrerPolicy = ReferrerPolicyDefault; 374 m_referrerPolicy = ReferrerPolicyDefault;
375 } 375 }
376 376
377 void ResourceRequest::setTargetTypeForMainResource(bool isMainFrame)
378 {
379 m_targetType = isMainFrame ? TargetIsMainFrame : TargetIsSubframe;
380 }
381
377 // This is used by the loader to control the number of issued parallel load requ ests. 382 // This is used by the loader to control the number of issued parallel load requ ests.
378 unsigned initializeMaximumHTTPConnectionCountPerHost() 383 unsigned initializeMaximumHTTPConnectionCountPerHost()
379 { 384 {
380 // The chromium network stack already handles limiting the number of 385 // The chromium network stack already handles limiting the number of
381 // parallel requests per host, so there's no need to do it here. Therefore, 386 // parallel requests per host, so there's no need to do it here. Therefore,
382 // this is set to a high value that should never be hit in practice. 387 // this is set to a high value that should never be hit in practice.
383 return 10000; 388 return 10000;
384 } 389 }
385 390
386 } 391 }
OLDNEW
« no previous file with comments | « Source/platform/network/ResourceRequest.h ('k') | Source/web/FrameLoaderClientImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698