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

Side by Side Diff: chrome/browser/net/predictor.h

Issue 1131293004: Add cross origin to Blink-driven preconnect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Bring back layering violation. Add a TODO Created 5 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // A Predictor object is instantiated once in the browser process, and manages 5 // A Predictor object is instantiated once in the browser process, and manages
6 // both preresolution of hostnames, as well as TCP/IP preconnection to expected 6 // both preresolution of hostnames, as well as TCP/IP preconnection to expected
7 // subresources. 7 // subresources.
8 // Most hostname lists are provided by the renderer processes, and include URLs 8 // Most hostname lists are provided by the renderer processes, and include URLs
9 // that *might* be used in the near future by the browsing user. One goal of 9 // that *might* be used in the near future by the browsing user. One goal of
10 // this class is to cause the underlying DNS structure to lookup a hostname 10 // this class is to cause the underlying DNS structure to lookup a hostname
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 // to the IO thread if necessary. 235 // to the IO thread if necessary.
236 void SaveStateForNextStartupAndTrim(); 236 void SaveStateForNextStartupAndTrim();
237 237
238 void SaveDnsPrefetchStateForNextStartupAndTrim( 238 void SaveDnsPrefetchStateForNextStartupAndTrim(
239 base::ListValue* startup_list, 239 base::ListValue* startup_list,
240 base::ListValue* referral_list, 240 base::ListValue* referral_list,
241 base::WaitableEvent* completion); 241 base::WaitableEvent* completion);
242 242
243 // May be called from either the IO or UI thread and will PostTask 243 // May be called from either the IO or UI thread and will PostTask
244 // to the IO thread if necessary. 244 // to the IO thread if necessary.
245 void PreconnectUrl(const GURL& url, const GURL& first_party_for_cookies, 245 void PreconnectUrl(const GURL& url,
246 UrlInfo::ResolutionMotivation motivation, int count); 246 const GURL& first_party_for_cookies,
247 UrlInfo::ResolutionMotivation motivation,
248 int count,
249 bool allow_credentials);
jochen (gone - plz use gerrit) 2015/07/22 09:35:03 the ipc message has the bool first, then the count
247 250
248 void PreconnectUrlOnIOThread(const GURL& url, 251 void PreconnectUrlOnIOThread(const GURL& url,
249 const GURL& first_party_for_cookies, 252 const GURL& first_party_for_cookies,
250 UrlInfo::ResolutionMotivation motivation, 253 UrlInfo::ResolutionMotivation motivation,
251 int count); 254 int count,
255 bool allow_credentials);
252 256
253 // ------------- End IO thread methods. 257 // ------------- End IO thread methods.
254 258
255 // The following methods may be called on either the IO or UI threads. 259 // The following methods may be called on either the IO or UI threads.
256 260
257 // Instigate pre-connection to any URLs, or pre-resolution of related host, 261 // Instigate pre-connection to any URLs, or pre-resolution of related host,
258 // that we predict will be needed after this navigation (typically 262 // that we predict will be needed after this navigation (typically
259 // more-embedded resources on a page). This method will actually post a task 263 // more-embedded resources on a page). This method will actually post a task
260 // to do the actual work, so as not to jump ahead of the frame navigation that 264 // to do the actual work, so as not to jump ahead of the frame navigation that
261 // instigated this activity. 265 // instigated this activity.
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 613
610 private: 614 private:
611 // These member functions return True for unittests. 615 // These member functions return True for unittests.
612 bool CanPrefetchAndPrerender() const override; 616 bool CanPrefetchAndPrerender() const override;
613 bool CanPreresolveAndPreconnect() const override; 617 bool CanPreresolveAndPreconnect() const override;
614 }; 618 };
615 619
616 } // namespace chrome_browser_net 620 } // namespace chrome_browser_net
617 621
618 #endif // CHROME_BROWSER_NET_PREDICTOR_H_ 622 #endif // CHROME_BROWSER_NET_PREDICTOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698