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

Side by Side Diff: content/child/request_extra_data.h

Issue 18601004: Add the UMA PLT.BeginToFinish{,Doc}_AfterPreconnectRequest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: follow interface change Created 7 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 #ifndef CONTENT_CHILD_REQUEST_EXTRA_DATA_H_ 5 #ifndef CONTENT_CHILD_REQUEST_EXTRA_DATA_H_
6 #define CONTENT_CHILD_REQUEST_EXTRA_DATA_H_ 6 #define CONTENT_CHILD_REQUEST_EXTRA_DATA_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "content/common/content_export.h" 9 #include "content/common/content_export.h"
10 #include "content/public/common/page_transition_types.h" 10 #include "content/public/common/page_transition_types.h"
11 #include "webkit/glue/weburlrequest_extradata_impl.h" 11 #include "webkit/glue/weburlrequest_extradata_impl.h"
12 12
13 namespace content { 13 namespace content {
14 14
15 // The RenderView stores an instance of this class in the "extra data" of each 15 // The RenderView stores an instance of this class in the "extra data" of each
16 // ResourceRequest (see RenderView::willSendRequest). 16 // ResourceRequest (see RenderView::willSendRequest).
17 class CONTENT_EXPORT RequestExtraData 17 class CONTENT_EXPORT RequestExtraData
18 : NON_EXPORTED_BASE(public webkit_glue::WebURLRequestExtraDataImpl) { 18 : NON_EXPORTED_BASE(public webkit_glue::WebURLRequestExtraDataImpl) {
19 public: 19 public:
20 static const int kType;
21
20 RequestExtraData(WebKit::WebReferrerPolicy referrer_policy, 22 RequestExtraData(WebKit::WebReferrerPolicy referrer_policy,
21 const WebKit::WebString& custom_user_agent, 23 const WebKit::WebString& custom_user_agent,
24 bool was_after_preconnect_request,
22 bool is_main_frame, 25 bool is_main_frame,
23 int64 frame_id, 26 int64 frame_id,
24 bool parent_is_main_frame, 27 bool parent_is_main_frame,
25 int64 parent_frame_id, 28 int64 parent_frame_id,
26 bool allow_download, 29 bool allow_download,
27 PageTransition transition_type, 30 PageTransition transition_type,
28 int transferred_request_child_id, 31 int transferred_request_child_id,
29 int transferred_request_request_id); 32 int transferred_request_request_id);
30 virtual ~RequestExtraData(); 33 virtual ~RequestExtraData();
31 34
35 bool was_after_preconnect_request() { return was_after_preconnect_request_; }
32 bool is_main_frame() const { return is_main_frame_; } 36 bool is_main_frame() const { return is_main_frame_; }
33 int64 frame_id() const { return frame_id_; } 37 int64 frame_id() const { return frame_id_; }
34 bool parent_is_main_frame() const { return parent_is_main_frame_; } 38 bool parent_is_main_frame() const { return parent_is_main_frame_; }
35 int64 parent_frame_id() const { return parent_frame_id_; } 39 int64 parent_frame_id() const { return parent_frame_id_; }
36 bool allow_download() const { return allow_download_; } 40 bool allow_download() const { return allow_download_; }
37 PageTransition transition_type() const { return transition_type_; } 41 PageTransition transition_type() const { return transition_type_; }
38 int transferred_request_child_id() const { 42 int transferred_request_child_id() const {
39 return transferred_request_child_id_; 43 return transferred_request_child_id_;
40 } 44 }
41 int transferred_request_request_id() const { 45 int transferred_request_request_id() const {
42 return transferred_request_request_id_; 46 return transferred_request_request_id_;
43 } 47 }
44 48
45 private: 49 private:
50 bool was_after_preconnect_request_;
46 bool is_main_frame_; 51 bool is_main_frame_;
47 int64 frame_id_; 52 int64 frame_id_;
48 bool parent_is_main_frame_; 53 bool parent_is_main_frame_;
49 int64 parent_frame_id_; 54 int64 parent_frame_id_;
50 bool allow_download_; 55 bool allow_download_;
51 PageTransition transition_type_; 56 PageTransition transition_type_;
52 int transferred_request_child_id_; 57 int transferred_request_child_id_;
53 int transferred_request_request_id_; 58 int transferred_request_request_id_;
54 59
55 DISALLOW_COPY_AND_ASSIGN(RequestExtraData); 60 DISALLOW_COPY_AND_ASSIGN(RequestExtraData);
56 }; 61 };
57 62
58 } // namespace content 63 } // namespace content
59 64
60 #endif // CONTENT_CHILD_REQUEST_EXTRA_DATA_H_ 65 #endif // CONTENT_CHILD_REQUEST_EXTRA_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698