Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 #include "content/browser/frame_host/navigator_impl.h" | 5 #include "content/browser/frame_host/navigator_impl.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
| 10 #include "content/browser/frame_host/frame_tree.h" | 10 #include "content/browser/frame_host/frame_tree.h" |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 219 // to say when it's safe to leave aborted URLs in the omnibox, to let the user | 219 // to say when it's safe to leave aborted URLs in the omnibox, to let the user |
| 220 // edit the URL and try again. This may be useful in cases that the committed | 220 // edit the URL and try again. This may be useful in cases that the committed |
| 221 // page cannot be attacker-controlled. In these cases, we still allow the | 221 // page cannot be attacker-controlled. In these cases, we still allow the |
| 222 // view to clear the pending entry and typed URL if the user requests | 222 // view to clear the pending entry and typed URL if the user requests |
| 223 // (e.g., hitting Escape with focus in the address bar). | 223 // (e.g., hitting Escape with focus in the address bar). |
| 224 // | 224 // |
| 225 // Note: don't touch the transient entry, since an interstitial may exist. | 225 // Note: don't touch the transient entry, since an interstitial may exist. |
| 226 bool should_preserve_entry = controller_->IsUnmodifiedBlankTab() || | 226 bool should_preserve_entry = controller_->IsUnmodifiedBlankTab() || |
| 227 delegate_->ShouldPreserveAbortedURLs(); | 227 delegate_->ShouldPreserveAbortedURLs(); |
| 228 if (controller_->GetPendingEntry() != controller_->GetVisibleEntry() || | 228 if (controller_->GetPendingEntry() != controller_->GetVisibleEntry() || |
| 229 !should_preserve_entry) { | 229 !should_preserve_entry) { |
|
Charlie Reis
2015/04/03 20:59:46
Hmm, the fact that this DiscardPendingEntry call i
| |
| 230 controller_->DiscardPendingEntry(); | 230 controller_->DiscardPendingEntry(true); |
|
davidben
2015/04/03 19:44:11
How does this work in the OOPIF world? It seems st
Avi (use Gerrit)
2015/04/03 19:51:47
I don't follow. How does location.replace figure i
davidben
2015/04/03 20:23:44
I possibly stapled this to the wrong comment. Navi
Avi (use Gerrit)
2015/04/03 20:30:36
I'm pretty confused as well, so don't worry.
Righ
Charlie Reis
2015/04/03 20:38:21
David's point is valid, though I'm not sure locati
Avi (use Gerrit)
2015/04/06 19:38:17
If you want me to come back to this after I kill p
| |
| 231 | 231 |
| 232 // Also force the UI to refresh. | 232 // Also force the UI to refresh. |
| 233 controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_URL); | 233 controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_URL); |
| 234 } | 234 } |
| 235 | 235 |
| 236 if (delegate_) | 236 if (delegate_) |
| 237 delegate_->DidFailProvisionalLoadWithError(render_frame_host, params); | 237 delegate_->DidFailProvisionalLoadWithError(render_frame_host, params); |
| 238 } | 238 } |
| 239 | 239 |
| 240 void NavigatorImpl::DidFailLoadWithError( | 240 void NavigatorImpl::DidFailLoadWithError( |
| (...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 891 "Navigation.TimeToCommit_ExistingRenderer_BeforeUnloadDiscounted", | 891 "Navigation.TimeToCommit_ExistingRenderer_BeforeUnloadDiscounted", |
| 892 time_to_commit); | 892 time_to_commit); |
| 893 UMA_HISTOGRAM_TIMES( | 893 UMA_HISTOGRAM_TIMES( |
| 894 "Navigation.TimeToURLJobStart_ExistingRenderer_BeforeUnloadDiscounted", | 894 "Navigation.TimeToURLJobStart_ExistingRenderer_BeforeUnloadDiscounted", |
| 895 time_to_network); | 895 time_to_network); |
| 896 } | 896 } |
| 897 navigation_data_.reset(); | 897 navigation_data_.reset(); |
| 898 } | 898 } |
| 899 | 899 |
| 900 } // namespace content | 900 } // namespace content |
| OLD | NEW |