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

Side by Side Diff: third_party/WebKit/Source/platform/loader/fetch/FetchInitiatorInfo.h

Issue 2751023005: DevTools: expose linkPreload bit on the network request (Closed)
Patch Set: Created 3 years, 9 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) 2013 Google, Inc. All rights reserved. 2 * Copyright (C) 2013 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 17 matching lines...) Expand all
28 28
29 #include "wtf/Allocator.h" 29 #include "wtf/Allocator.h"
30 #include "wtf/text/AtomicString.h" 30 #include "wtf/text/AtomicString.h"
31 #include "wtf/text/TextPosition.h" 31 #include "wtf/text/TextPosition.h"
32 32
33 namespace blink { 33 namespace blink {
34 34
35 struct FetchInitiatorInfo { 35 struct FetchInitiatorInfo {
36 DISALLOW_NEW(); 36 DISALLOW_NEW();
37 FetchInitiatorInfo() 37 FetchInitiatorInfo()
38 : name(), position(TextPosition::belowRangePosition()), startTime(0.0) {} 38 : name(),
39 position(TextPosition::belowRangePosition()),
40 startTime(0.0),
41 isLinkPreload(false) {}
39 42
40 // When adding members, CrossThreadFetchInitiatorInfoData should be 43 // When adding members, CrossThreadFetchInitiatorInfoData should be
41 // updated. 44 // updated.
42 AtomicString name; 45 AtomicString name;
43 TextPosition position; 46 TextPosition position;
44 double startTime; 47 double startTime;
48 bool isLinkPreload;
45 }; 49 };
46 50
47 // Encode AtomicString as String to cross threads. 51 // Encode AtomicString as String to cross threads.
48 struct CrossThreadFetchInitiatorInfoData { 52 struct CrossThreadFetchInitiatorInfoData {
49 DISALLOW_NEW(); 53 DISALLOW_NEW();
50 explicit CrossThreadFetchInitiatorInfoData(const FetchInitiatorInfo& info) 54 explicit CrossThreadFetchInitiatorInfoData(const FetchInitiatorInfo& info)
51 : name(info.name.getString().isolatedCopy()), 55 : name(info.name.getString().isolatedCopy()),
52 position(info.position), 56 position(info.position),
53 startTime(info.startTime) {} 57 startTime(info.startTime),
58 isLinkPreload(info.isLinkPreload) {}
54 59
55 operator FetchInitiatorInfo() const { 60 operator FetchInitiatorInfo() const {
56 FetchInitiatorInfo info; 61 FetchInitiatorInfo info;
57 info.name = AtomicString(name); 62 info.name = AtomicString(name);
58 info.position = position; 63 info.position = position;
59 info.startTime = startTime; 64 info.startTime = startTime;
65 info.isLinkPreload = isLinkPreload;
60 return info; 66 return info;
61 } 67 }
62 68
63 String name; 69 String name;
64 TextPosition position; 70 TextPosition position;
65 double startTime; 71 double startTime;
72 bool isLinkPreload;
66 }; 73 };
67 74
68 } // namespace blink 75 } // namespace blink
69 76
70 #endif 77 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698