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

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

Issue 1856693002: Revert of Ensure RenderFrameHost & NavigationHandle are not destroyed during commit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 8 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 | content/browser/frame_host/navigation_handle_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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_NAVIGATION_HANDLE_IMPL_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_
6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_
7 7
8 #include "content/public/browser/navigation_handle.h" 8 #include "content/public/browser/navigation_handle.h"
9 9
10 #include <stddef.h> 10 #include <stddef.h>
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 // delegate. 204 // delegate.
205 void ReadyToCommitNavigation(RenderFrameHostImpl* render_frame_host); 205 void ReadyToCommitNavigation(RenderFrameHostImpl* render_frame_host);
206 206
207 // Called when the navigation was committed in |render_frame_host|. This will 207 // Called when the navigation was committed in |render_frame_host|. This will
208 // update the |state_|. 208 // update the |state_|.
209 void DidCommitNavigation( 209 void DidCommitNavigation(
210 const FrameHostMsg_DidCommitProvisionalLoad_Params& params, 210 const FrameHostMsg_DidCommitProvisionalLoad_Params& params,
211 bool same_page, 211 bool same_page,
212 RenderFrameHostImpl* render_frame_host); 212 RenderFrameHostImpl* render_frame_host);
213 213
214 // TODO(clamy): Remove this once enough data has been gathered for
215 // crbug.com/589365.
216 void set_is_in_commit(bool is_in_commit) { is_in_commit_ = is_in_commit; }
217
218 private: 214 private:
219 friend class NavigationHandleImplTest; 215 friend class NavigationHandleImplTest;
220 216
221 // Used to track the state the navigation is currently in. 217 // Used to track the state the navigation is currently in.
222 enum State { 218 enum State {
223 INITIAL = 0, 219 INITIAL = 0,
224 WILL_SEND_REQUEST, 220 WILL_SEND_REQUEST,
225 DEFERRING_START, 221 DEFERRING_START,
226 WILL_REDIRECT_REQUEST, 222 WILL_REDIRECT_REQUEST,
227 DEFERRING_REDIRECT, 223 DEFERRING_REDIRECT,
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 int pending_nav_entry_id_; 285 int pending_nav_entry_id_;
290 286
291 // This callback will be run when all throttle checks have been performed. 287 // This callback will be run when all throttle checks have been performed.
292 ThrottleChecksFinishedCallback complete_callback_; 288 ThrottleChecksFinishedCallback complete_callback_;
293 289
294 // PlzNavigate 290 // PlzNavigate
295 // Manages the lifetime of a pre-created ServiceWorkerProviderHost until a 291 // Manages the lifetime of a pre-created ServiceWorkerProviderHost until a
296 // corresponding ServiceWorkerNetworkProvider is created in the renderer. 292 // corresponding ServiceWorkerNetworkProvider is created in the renderer.
297 scoped_ptr<ServiceWorkerNavigationHandle> service_worker_handle_; 293 scoped_ptr<ServiceWorkerNavigationHandle> service_worker_handle_;
298 294
299 // True if the RenderFrameHost that owns the NavigationHandle is in the
300 // process of committing a navigation. This is temporary to help pinpoint
301 // the cause of crbug.com/589365.
302 // TODO(clamy): Remove once enough data has been gathered.
303 bool is_in_commit_;
304
305 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl); 295 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl);
306 }; 296 };
307 297
308 } // namespace content 298 } // namespace content
309 299
310 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ 300 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/frame_host/navigation_handle_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698