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

Side by Side Diff: components/subresource_filter/content/browser/activation_state_computing_navigation_throttle.h

Issue 2861053004: [subresource_filter] Add metrics for all NavigationThrottle delays (Closed)
Patch Set: microseconds Created 3 years, 7 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
« no previous file with comments | « no previous file | components/subresource_filter/content/browser/activation_state_computing_navigation_throttle.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 COMPONENTS_SUBRESOURCE_FILTER_CONTENT_BROWSER_FRAME_ACTIVATION_NAVIGATIO N_THROTTLE_H_ 5 #ifndef COMPONENTS_SUBRESOURCE_FILTER_CONTENT_BROWSER_FRAME_ACTIVATION_NAVIGATIO N_THROTTLE_H_
6 #define COMPONENTS_SUBRESOURCE_FILTER_CONTENT_BROWSER_FRAME_ACTIVATION_NAVIGATIO N_THROTTLE_H_ 6 #define COMPONENTS_SUBRESOURCE_FILTER_CONTENT_BROWSER_FRAME_ACTIVATION_NAVIGATIO N_THROTTLE_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
12 #include "base/optional.h" 12 #include "base/optional.h"
13 #include "base/time/time.h"
13 #include "components/subresource_filter/content/browser/verified_ruleset_dealer. h" 14 #include "components/subresource_filter/content/browser/verified_ruleset_dealer. h"
14 #include "components/subresource_filter/core/common/activation_state.h" 15 #include "components/subresource_filter/core/common/activation_state.h"
15 #include "content/public/browser/navigation_throttle.h" 16 #include "content/public/browser/navigation_throttle.h"
16 17
17 namespace subresource_filter { 18 namespace subresource_filter {
18 19
19 class AsyncDocumentSubresourceFilter; 20 class AsyncDocumentSubresourceFilter;
20 21
21 // NavigationThrottle responsible for determining the activation state of 22 // NavigationThrottle responsible for determining the activation state of
22 // subresource filtering for a given navigation (either in the main frame or in 23 // subresource filtering for a given navigation (either in the main frame or in
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 83
83 // Optional to allow for DCHECKing. 84 // Optional to allow for DCHECKing.
84 base::Optional<ActivationState> parent_activation_state_; 85 base::Optional<ActivationState> parent_activation_state_;
85 86
86 std::unique_ptr<AsyncDocumentSubresourceFilter> async_filter_; 87 std::unique_ptr<AsyncDocumentSubresourceFilter> async_filter_;
87 88
88 // Must outlive this class. For main frame navigations, this member will be 89 // Must outlive this class. For main frame navigations, this member will be
89 // nullptr until NotifyPageActivationWithRuleset is called. 90 // nullptr until NotifyPageActivationWithRuleset is called.
90 VerifiedRuleset::Handle* ruleset_handle_; 91 VerifiedRuleset::Handle* ruleset_handle_;
91 92
93 base::TimeTicks defer_timestamp_;
94
92 // Becomes true when the throttle manager reaches ReadyToCommitNavigation and 95 // Becomes true when the throttle manager reaches ReadyToCommitNavigation and
93 // sends an activation IPC to the render process. Makes sure a caller cannot 96 // sends an activation IPC to the render process. Makes sure a caller cannot
94 // take ownership of the subresource filter unless an activation IPC is sent 97 // take ownership of the subresource filter unless an activation IPC is sent
95 // to the renderer. 98 // to the renderer.
96 bool will_send_activation_to_renderer_ = false; 99 bool will_send_activation_to_renderer_ = false;
97 100
98 base::WeakPtrFactory<ActivationStateComputingNavigationThrottle> 101 base::WeakPtrFactory<ActivationStateComputingNavigationThrottle>
99 weak_ptr_factory_; 102 weak_ptr_factory_;
100 103
101 DISALLOW_COPY_AND_ASSIGN(ActivationStateComputingNavigationThrottle); 104 DISALLOW_COPY_AND_ASSIGN(ActivationStateComputingNavigationThrottle);
102 }; 105 };
103 106
104 } // namespace subresource_filter 107 } // namespace subresource_filter
105 108
106 #endif // COMPONENTS_SUBRESOURCE_FILTER_CONTENT_BROWSER_FRAME_ACTIVATION_NAVIGA TION_THROTTLE_H_ 109 #endif // COMPONENTS_SUBRESOURCE_FILTER_CONTENT_BROWSER_FRAME_ACTIVATION_NAVIGA TION_THROTTLE_H_
OLDNEW
« no previous file with comments | « no previous file | components/subresource_filter/content/browser/activation_state_computing_navigation_throttle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698