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

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: Created 6 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
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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 data->m_hasUserGesture = m_hasUserGesture; 75 data->m_hasUserGesture = m_hasUserGesture;
76 data->m_downloadToFile = m_downloadToFile; 76 data->m_downloadToFile = m_downloadToFile;
77 data->m_requestorID = m_requestorID; 77 data->m_requestorID = m_requestorID;
78 data->m_requestorProcessID = m_requestorProcessID; 78 data->m_requestorProcessID = m_requestorProcessID;
79 data->m_appCacheHostID = m_appCacheHostID; 79 data->m_appCacheHostID = m_appCacheHostID;
80 data->m_targetType = m_targetType; 80 data->m_targetType = m_targetType;
81 data->m_referrerPolicy = m_referrerPolicy; 81 data->m_referrerPolicy = m_referrerPolicy;
82 return data.release(); 82 return data.release();
83 } 83 }
84 84
85 void ResourceRequest::initializeForMainResource(bool isMainFrame)
ppi 2014/06/19 18:25:42 This can be called at any point, while ::initializ
86 {
87 m_targetType = isMainFrame ? TargetIsMainFrame : TargetIsSubframe;
88 m_priority = ResourceLoadPriorityVeryHigh;
89 }
90
85 bool ResourceRequest::isEmpty() const 91 bool ResourceRequest::isEmpty() const
86 { 92 {
87 return m_url.isEmpty(); 93 return m_url.isEmpty();
88 } 94 }
89 95
90 bool ResourceRequest::isNull() const 96 bool ResourceRequest::isNull() const
91 { 97 {
92 return m_url.isNull(); 98 return m_url.isNull();
93 } 99 }
94 100
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 // This is used by the loader to control the number of issued parallel load requ ests. 380 // This is used by the loader to control the number of issued parallel load requ ests.
375 unsigned initializeMaximumHTTPConnectionCountPerHost() 381 unsigned initializeMaximumHTTPConnectionCountPerHost()
376 { 382 {
377 // The chromium network stack already handles limiting the number of 383 // The chromium network stack already handles limiting the number of
378 // parallel requests per host, so there's no need to do it here. Therefore, 384 // parallel requests per host, so there's no need to do it here. Therefore,
379 // this is set to a high value that should never be hit in practice. 385 // this is set to a high value that should never be hit in practice.
380 return 10000; 386 return 10000;
381 } 387 }
382 388
383 } 389 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698