OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/net/net_error_tab_helper.h" | 5 #include "chrome/browser/net/net_error_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/prefs/pref_service.h" | |
10 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
11 #include "chrome/browser/io_thread.h" | 10 #include "chrome/browser/io_thread.h" |
12 #include "chrome/browser/net/dns_probe_service.h" | 11 #include "chrome/browser/net/dns_probe_service.h" |
13 #include "chrome/browser/net/net_error_diagnostics_dialog.h" | 12 #include "chrome/browser/net/net_error_diagnostics_dialog.h" |
14 #include "chrome/browser/platform_util.h" | 13 #include "chrome/browser/platform_util.h" |
15 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
16 #include "chrome/common/features.h" | 15 #include "chrome/common/features.h" |
17 #include "chrome/common/pref_names.h" | 16 #include "chrome/common/pref_names.h" |
18 #include "chrome/common/render_messages.h" | 17 #include "chrome/common/render_messages.h" |
19 #include "components/error_page/common/net_error_info.h" | 18 #include "components/error_page/common/net_error_info.h" |
| 19 #include "components/prefs/pref_service.h" |
20 #include "content/public/browser/browser_thread.h" | 20 #include "content/public/browser/browser_thread.h" |
21 #include "content/public/browser/navigation_entry.h" | 21 #include "content/public/browser/navigation_entry.h" |
22 #include "content/public/browser/navigation_handle.h" | 22 #include "content/public/browser/navigation_handle.h" |
23 #include "content/public/browser/render_frame_host.h" | 23 #include "content/public/browser/render_frame_host.h" |
24 #include "ipc/ipc_message_macros.h" | 24 #include "ipc/ipc_message_macros.h" |
25 #include "net/base/net_errors.h" | 25 #include "net/base/net_errors.h" |
26 #include "url/gurl.h" | 26 #include "url/gurl.h" |
27 | 27 |
28 #if BUILDFLAG(ANDROID_JAVA_UI) | 28 #if BUILDFLAG(ANDROID_JAVA_UI) |
29 #include "chrome/browser/android/offline_pages/offline_page_model_factory.h" | 29 #include "chrome/browser/android/offline_pages/offline_page_model_factory.h" |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 | 350 |
351 bool NetErrorTabHelper::IsFromErrorPage() const { | 351 bool NetErrorTabHelper::IsFromErrorPage() const { |
352 content::NavigationEntry* entry = | 352 content::NavigationEntry* entry = |
353 web_contents()->GetController().GetLastCommittedEntry(); | 353 web_contents()->GetController().GetLastCommittedEntry(); |
354 return entry && (entry->GetPageType() == content::PAGE_TYPE_ERROR); | 354 return entry && (entry->GetPageType() == content::PAGE_TYPE_ERROR); |
355 } | 355 } |
356 | 356 |
357 #endif // BUILDFLAG(ANDROID_JAVA_UI) | 357 #endif // BUILDFLAG(ANDROID_JAVA_UI) |
358 | 358 |
359 } // namespace chrome_browser_net | 359 } // namespace chrome_browser_net |
OLD | NEW |