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

Side by Side Diff: third_party/WebKit/public/platform/WebURLRequest.h

Issue 2584513003: PlzNavigate: identify same-page browser-initiated navigation. (Closed)
Patch Set: Adding a DCHECK to probably make a lot of tests fail. Created 3 years, 11 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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 BLINK_PLATFORM_EXPORT void setInputPerfMetricReportPolicy( 325 BLINK_PLATFORM_EXPORT void setInputPerfMetricReportPolicy(
326 WebURLRequest::InputToLoadPerfMetricReportPolicy); 326 WebURLRequest::InputToLoadPerfMetricReportPolicy);
327 327
328 // https://mikewest.github.io/cors-rfc1918/#external-request 328 // https://mikewest.github.io/cors-rfc1918/#external-request
329 BLINK_PLATFORM_EXPORT bool isExternalRequest() const; 329 BLINK_PLATFORM_EXPORT bool isExternalRequest() const;
330 330
331 BLINK_PLATFORM_EXPORT LoadingIPCType getLoadingIPCType() const; 331 BLINK_PLATFORM_EXPORT LoadingIPCType getLoadingIPCType() const;
332 332
333 BLINK_PLATFORM_EXPORT void setNavigationStartTime(double); 333 BLINK_PLATFORM_EXPORT void setNavigationStartTime(double);
334 334
335 // PlzNavigate: specify that the request was intended to be loaded as a same
336 // document navigation. No network requests should be made and the request
337 // should be dropped if the page's URL has changed in-between.
338 BLINK_PLATFORM_EXPORT void setIsSameDocumentNavigation(bool);
339
335 #if INSIDE_BLINK 340 #if INSIDE_BLINK
336 BLINK_PLATFORM_EXPORT ResourceRequest& toMutableResourceRequest(); 341 BLINK_PLATFORM_EXPORT ResourceRequest& toMutableResourceRequest();
337 BLINK_PLATFORM_EXPORT const ResourceRequest& toResourceRequest() const; 342 BLINK_PLATFORM_EXPORT const ResourceRequest& toResourceRequest() const;
338 343
339 protected: 344 protected:
340 // Permit subclasses to set arbitrary ResourceRequest pointer as 345 // Permit subclasses to set arbitrary ResourceRequest pointer as
341 // |m_resourceRequest|. |m_ownedResourceRequest| is not set in this case. 346 // |m_resourceRequest|. |m_ownedResourceRequest| is not set in this case.
342 BLINK_PLATFORM_EXPORT explicit WebURLRequest(ResourceRequest&); 347 BLINK_PLATFORM_EXPORT explicit WebURLRequest(ResourceRequest&);
343 #endif 348 #endif
344 349
345 private: 350 private:
346 struct ResourceRequestContainer; 351 struct ResourceRequestContainer;
347 352
348 // If this instance owns a ResourceRequest then |m_ownedResourceRequest| 353 // If this instance owns a ResourceRequest then |m_ownedResourceRequest|
349 // is non-null and |m_resourceRequest| points to the ResourceRequest 354 // is non-null and |m_resourceRequest| points to the ResourceRequest
350 // instance it contains. 355 // instance it contains.
351 std::unique_ptr<ResourceRequestContainer> m_ownedResourceRequest; 356 std::unique_ptr<ResourceRequestContainer> m_ownedResourceRequest;
352 357
353 // Should never be null. 358 // Should never be null.
354 ResourceRequest* m_resourceRequest; 359 ResourceRequest* m_resourceRequest;
355 }; 360 };
356 361
357 } // namespace blink 362 } // namespace blink
358 363
359 #endif 364 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698