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

Side by Side Diff: content/browser/frame_host/navigator_impl.h

Issue 730553002: PlzNavigate: Refactor unit test helper functions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed the test utils class Created 6 years, 1 month 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 | content/browser/frame_host/navigator_impl.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_
6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_
7 7
8 #include "base/containers/scoped_ptr_hash_map.h" 8 #include "base/containers/scoped_ptr_hash_map.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 void CommitNavigation(FrameTreeNode* frame_tree_node, 75 void CommitNavigation(FrameTreeNode* frame_tree_node,
76 ResourceResponse* response, 76 ResourceResponse* response,
77 scoped_ptr<StreamHandle> body) override; 77 scoped_ptr<StreamHandle> body) override;
78 void LogResourceRequestTime(base::TimeTicks timestamp, 78 void LogResourceRequestTime(base::TimeTicks timestamp,
79 const GURL& url) override; 79 const GURL& url) override;
80 void LogBeforeUnloadTime( 80 void LogBeforeUnloadTime(
81 const base::TimeTicks& renderer_before_unload_start_time, 81 const base::TimeTicks& renderer_before_unload_start_time,
82 const base::TimeTicks& renderer_before_unload_end_time) override; 82 const base::TimeTicks& renderer_before_unload_end_time) override;
83 void CancelNavigation(FrameTreeNode* frame_tree_node) override; 83 void CancelNavigation(FrameTreeNode* frame_tree_node) override;
84 84
85 // PlzNavigate
86 // Returns the navigation request for a given node. Used in tests.
87 NavigationRequest* GetNavigationRequestForNodeForTesting(
88 FrameTreeNode* frame_tree_node);
89
85 private: 90 private:
86 // Holds data used to track browser side navigation metrics. 91 // Holds data used to track browser side navigation metrics.
87 struct NavigationMetricsData; 92 struct NavigationMetricsData;
88 93
89 friend class NavigatorTest; 94 friend class NavigatorTestWithBrowserSideNavigation;
90 ~NavigatorImpl() override; 95 ~NavigatorImpl() override;
91 96
92 // Navigates to the given entry, which must be the pending entry. Private 97 // Navigates to the given entry, which must be the pending entry. Private
93 // because all callers should use NavigateToPendingEntry. 98 // because all callers should use NavigateToPendingEntry.
94 bool NavigateToEntry( 99 bool NavigateToEntry(
95 RenderFrameHostImpl* render_frame_host, 100 RenderFrameHostImpl* render_frame_host,
96 const NavigationEntryImpl& entry, 101 const NavigationEntryImpl& entry,
97 NavigationController::ReloadType reload_type); 102 NavigationController::ReloadType reload_type);
98 103
99 bool ShouldAssignSiteForURL(const GURL& url); 104 bool ShouldAssignSiteForURL(const GURL& url);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 // different FrameTreeNodes, based on the frame_tree_node_id. 136 // different FrameTreeNodes, based on the frame_tree_node_id.
132 typedef base::ScopedPtrHashMap<int64, NavigationRequest> NavigationRequestMap; 137 typedef base::ScopedPtrHashMap<int64, NavigationRequest> NavigationRequestMap;
133 NavigationRequestMap navigation_request_map_; 138 NavigationRequestMap navigation_request_map_;
134 139
135 DISALLOW_COPY_AND_ASSIGN(NavigatorImpl); 140 DISALLOW_COPY_AND_ASSIGN(NavigatorImpl);
136 }; 141 };
137 142
138 } // namespace content 143 } // namespace content
139 144
140 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_ 145 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/frame_host/navigator_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698