| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "chrome/renderer/net/net_error_helper.h" | 5 #include "chrome/renderer/net/net_error_helper.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 core_->TrackClick(tracking_id); | 105 core_->TrackClick(tracking_id); |
| 106 } | 106 } |
| 107 | 107 |
| 108 void NetErrorHelper::DidStartProvisionalLoad() { | 108 void NetErrorHelper::DidStartProvisionalLoad() { |
| 109 core_->OnStartLoad(GetFrameType(render_frame()), | 109 core_->OnStartLoad(GetFrameType(render_frame()), |
| 110 GetLoadingPageType(render_frame())); | 110 GetLoadingPageType(render_frame())); |
| 111 } | 111 } |
| 112 | 112 |
| 113 void NetErrorHelper::DidCommitProvisionalLoad(bool is_new_navigation, | 113 void NetErrorHelper::DidCommitProvisionalLoad(bool is_new_navigation, |
| 114 bool is_same_page_navigation) { | 114 bool is_same_page_navigation) { |
| 115 // If this is a "same page" navigation, it's not a real navigation. There |
| 116 // wasn't a start event for it, either, so just ignore it. |
| 117 if (is_same_page_navigation) |
| 118 return; |
| 119 |
| 115 // Invalidate weak pointers from old error page controllers. If loading a new | 120 // Invalidate weak pointers from old error page controllers. If loading a new |
| 116 // error page, the controller has not yet been attached, so this won't affect | 121 // error page, the controller has not yet been attached, so this won't affect |
| 117 // it. | 122 // it. |
| 118 weak_controller_delegate_factory_.InvalidateWeakPtrs(); | 123 weak_controller_delegate_factory_.InvalidateWeakPtrs(); |
| 119 | 124 |
| 120 core_->OnCommitLoad(GetFrameType(render_frame()), | 125 core_->OnCommitLoad(GetFrameType(render_frame()), |
| 121 render_frame()->GetWebFrame()->document().url()); | 126 render_frame()->GetWebFrame()->document().url()); |
| 122 } | 127 } |
| 123 | 128 |
| 124 void NetErrorHelper::DidFinishLoad() { | 129 void NetErrorHelper::DidFinishLoad() { |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 const std::string& data) { | 389 const std::string& data) { |
| 385 tracking_fetcher_.reset(); | 390 tracking_fetcher_.reset(); |
| 386 } | 391 } |
| 387 | 392 |
| 388 #if defined(OS_ANDROID) | 393 #if defined(OS_ANDROID) |
| 389 void NetErrorHelper::OnSetOfflinePageInfo( | 394 void NetErrorHelper::OnSetOfflinePageInfo( |
| 390 OfflinePageStatus offline_page_status) { | 395 OfflinePageStatus offline_page_status) { |
| 391 core_->OnSetOfflinePageInfo(offline_page_status); | 396 core_->OnSetOfflinePageInfo(offline_page_status); |
| 392 } | 397 } |
| 393 #endif // defined(OS_ANDROID) | 398 #endif // defined(OS_ANDROID) |
| OLD | NEW |