OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/browser/android/offline_pages/offline_page_tab_helper.h" | 5 #include "chrome/browser/android/offline_pages/offline_page_tab_helper.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "base/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
11 #include "chrome/browser/android/offline_pages/offline_page_utils.h" | 11 #include "chrome/browser/android/offline_pages/offline_page_utils.h" |
12 #include "content/public/browser/browser_thread.h" | 12 #include "content/public/browser/browser_thread.h" |
13 #include "content/public/browser/navigation_controller.h" | 13 #include "content/public/browser/navigation_controller.h" |
14 #include "content/public/browser/navigation_entry.h" | 14 #include "content/public/browser/navigation_entry.h" |
15 #include "content/public/browser/navigation_handle.h" | 15 #include "content/public/browser/navigation_handle.h" |
16 #include "content/public/browser/render_frame_host.h" | 16 #include "content/public/browser/render_frame_host.h" |
17 #include "content/public/browser/web_contents.h" | 17 #include "content/public/browser/web_contents.h" |
18 #include "net/base/net_errors.h" | 18 #include "net/base/net_errors.h" |
19 #include "net/base/network_change_notifier.h" | 19 #include "net/base/network_change_notifier.h" |
20 #include "ui/base/page_transition_types.h" | 20 #include "ui/base/page_transition_types.h" |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 UMA_HISTOGRAM_COUNTS("OfflinePages.RedirectToOnlineCount", 1); | 132 UMA_HISTOGRAM_COUNTS("OfflinePages.RedirectToOnlineCount", 1); |
133 } | 133 } |
134 | 134 |
135 content::NavigationController::LoadURLParams load_params(to_url); | 135 content::NavigationController::LoadURLParams load_params(to_url); |
136 load_params.transition_type = ui::PAGE_TRANSITION_CLIENT_REDIRECT; | 136 load_params.transition_type = ui::PAGE_TRANSITION_CLIENT_REDIRECT; |
137 load_params.redirect_chain.push_back(from_url); | 137 load_params.redirect_chain.push_back(from_url); |
138 web_contents()->GetController().LoadURLWithParams(load_params); | 138 web_contents()->GetController().LoadURLWithParams(load_params); |
139 } | 139 } |
140 | 140 |
141 } // namespace offline_pages | 141 } // namespace offline_pages |
OLD | NEW |