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 24 matching lines...) Expand all Loading... |
35 #include "third_party/WebKit/public/web/WebDataSource.h" | 35 #include "third_party/WebKit/public/web/WebDataSource.h" |
36 #include "third_party/WebKit/public/web/WebDocument.h" | 36 #include "third_party/WebKit/public/web/WebDocument.h" |
37 #include "third_party/WebKit/public/web/WebLocalFrame.h" | 37 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
38 #include "third_party/WebKit/public/web/WebView.h" | 38 #include "third_party/WebKit/public/web/WebView.h" |
39 #include "ui/base/resource/resource_bundle.h" | 39 #include "ui/base/resource/resource_bundle.h" |
40 #include "ui/base/webui/jstemplate_builder.h" | 40 #include "ui/base/webui/jstemplate_builder.h" |
41 #include "url/gurl.h" | 41 #include "url/gurl.h" |
42 | 42 |
43 using base::JSONWriter; | 43 using base::JSONWriter; |
44 using chrome_common_net::DnsProbeStatus; | 44 using chrome_common_net::DnsProbeStatus; |
45 using chrome_common_net::DnsProbeStatusToString; | |
46 using content::DocumentState; | 45 using content::DocumentState; |
| 46 using content::kUnreachableWebDataURL; |
47 using content::RenderFrame; | 47 using content::RenderFrame; |
48 using content::RenderFrameObserver; | 48 using content::RenderFrameObserver; |
49 using content::RenderThread; | 49 using content::RenderThread; |
50 using content::kUnreachableWebDataURL; | 50 using error_page::DnsProbeStatusToString; |
51 using error_page::ErrorPageParams; | 51 using error_page::ErrorPageParams; |
52 using error_page::NetErrorHelperCore; | 52 using error_page::NetErrorHelperCore; |
53 | 53 |
54 namespace { | 54 namespace { |
55 | 55 |
56 // Number of seconds to wait for the navigation correction service to return | 56 // Number of seconds to wait for the navigation correction service to return |
57 // suggestions. If it takes too long, just use the local error page. | 57 // suggestions. If it takes too long, just use the local error page. |
58 static const int kNavigationCorrectionFetchTimeoutSec = 3; | 58 static const int kNavigationCorrectionFetchTimeoutSec = 3; |
59 | 59 |
60 NetErrorHelperCore::PageType GetLoadingPageType(const blink::WebFrame* frame) { | 60 NetErrorHelperCore::PageType GetLoadingPageType(const blink::WebFrame* frame) { |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 success ? data : "", | 373 success ? data : "", |
374 render_frame()->GetRenderView()->GetAcceptLanguages(), | 374 render_frame()->GetRenderView()->GetAcceptLanguages(), |
375 base::i18n::IsRTL()); | 375 base::i18n::IsRTL()); |
376 } | 376 } |
377 | 377 |
378 void NetErrorHelper::OnTrackingRequestComplete( | 378 void NetErrorHelper::OnTrackingRequestComplete( |
379 const blink::WebURLResponse& response, | 379 const blink::WebURLResponse& response, |
380 const std::string& data) { | 380 const std::string& data) { |
381 tracking_fetcher_.reset(); | 381 tracking_fetcher_.reset(); |
382 } | 382 } |
OLD | NEW |