Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Side by Side Diff: chrome/renderer/net/net_error_helper.h

Issue 137623011: Switch to using the new Link Doctor API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Remove bonus line from a merge conflict Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/render_messages.h ('k') | chrome/renderer/net/net_error_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef CHROME_RENDERER_NET_NET_ERROR_HELPER_H_ 5 #ifndef CHROME_RENDERER_NET_NET_ERROR_HELPER_H_
6 #define CHROME_RENDERER_NET_NET_ERROR_HELPER_H_ 6 #define CHROME_RENDERER_NET_NET_ERROR_HELPER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_ptr.h"
11 #include "chrome/common/localized_error.h"
10 #include "chrome/common/net/net_error_info.h" 12 #include "chrome/common/net/net_error_info.h"
11 #include "chrome/renderer/net/net_error_helper_core.h" 13 #include "chrome/renderer/net/net_error_helper_core.h"
12 #include "content/public/renderer/render_frame_observer.h" 14 #include "content/public/renderer/render_frame_observer.h"
13 #include "content/public/renderer/render_frame_observer_tracker.h" 15 #include "content/public/renderer/render_frame_observer_tracker.h"
14 16
15 class GURL; 17 class GURL;
16 18
17 namespace content { 19 namespace content {
18 class ResourceFetcher; 20 class ResourceFetcher;
19 } 21 }
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 // 54 //
53 // Updates the NetErrorHelper with the assumption the page will be loaded 55 // Updates the NetErrorHelper with the assumption the page will be loaded
54 // immediately. 56 // immediately.
55 void GetErrorHTML(blink::WebFrame* frame, 57 void GetErrorHTML(blink::WebFrame* frame,
56 const blink::WebURLError& error, 58 const blink::WebURLError& error,
57 bool is_failed_post, 59 bool is_failed_post,
58 std::string* error_html); 60 std::string* error_html);
59 61
60 private: 62 private:
61 // NetErrorHelperCore::Delegate implementation: 63 // NetErrorHelperCore::Delegate implementation:
62 virtual void GenerateLocalizedErrorPage(const blink::WebURLError& error, 64 virtual void GenerateLocalizedErrorPage(
63 bool is_failed_post, 65 const blink::WebURLError& error,
64 std::string* html) const OVERRIDE; 66 bool is_failed_post,
67 scoped_ptr<LocalizedError::ErrorPageParams> params,
68 std::string* html) const OVERRIDE;
65 virtual void LoadErrorPageInMainFrame(const std::string& html, 69 virtual void LoadErrorPageInMainFrame(const std::string& html,
66 const GURL& failed_url) OVERRIDE; 70 const GURL& failed_url) OVERRIDE;
67 virtual void UpdateErrorPage(const blink::WebURLError& error, 71 virtual void UpdateErrorPage(const blink::WebURLError& error,
68 bool is_failed_post) OVERRIDE; 72 bool is_failed_post) OVERRIDE;
69 virtual void FetchErrorPage(const GURL& url) OVERRIDE; 73 virtual void FetchNavigationCorrections(
70 virtual void CancelFetchErrorPage() OVERRIDE; 74 const GURL& navigation_correction_url,
75 const std::string& navigation_correction_request_body) OVERRIDE;
76 virtual void CancelFetchNavigationCorrections() OVERRIDE;
71 77
72 void OnNetErrorInfo(int status); 78 void OnNetErrorInfo(int status);
73 void OnSetAltErrorPageURL(const GURL& alternate_error_page_url); 79 void OnSetNavigationCorrectionInfo(const GURL& navigation_correction_url,
80 const std::string& language,
81 const std::string& country_code,
82 const std::string& api_key,
83 const GURL& search_url);
74 84
75 void OnAlternateErrorPageRetrieved(const blink::WebURLResponse& response, 85 void OnNavigationCorrectionsFetched(const blink::WebURLResponse& response,
76 const std::string& data); 86 const std::string& data);
77 87
78 scoped_ptr<content::ResourceFetcher> alt_error_page_fetcher_; 88 scoped_ptr<content::ResourceFetcher> correction_fetcher_;
79 89
80 NetErrorHelperCore core_; 90 NetErrorHelperCore core_;
81 }; 91 };
82 92
83 #endif // CHROME_RENDERER_NET_NET_ERROR_HELPER_H_ 93 #endif // CHROME_RENDERER_NET_NET_ERROR_HELPER_H_
OLDNEW
« no previous file with comments | « chrome/common/render_messages.h ('k') | chrome/renderer/net/net_error_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698