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 #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/macros.h" | 10 #include "base/macros.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 bool is_failed_post, | 76 bool is_failed_post, |
77 std::string* error_html); | 77 std::string* error_html); |
78 | 78 |
79 // Returns whether a load for |url| in |frame| should have its error page | 79 // Returns whether a load for |url| in |frame| should have its error page |
80 // suppressed. | 80 // suppressed. |
81 bool ShouldSuppressErrorPage(blink::WebFrame* frame, const GURL& url); | 81 bool ShouldSuppressErrorPage(blink::WebFrame* frame, const GURL& url); |
82 | 82 |
83 // Called when a link with the given tracking ID is pressed. | 83 // Called when a link with the given tracking ID is pressed. |
84 void TrackClick(int tracking_id); | 84 void TrackClick(int tracking_id); |
85 | 85 |
| 86 // Tracks easter egg activations on the offline interstitial. |
| 87 void TrackActivatedEasterEgg(); |
| 88 |
86 private: | 89 private: |
87 // NetErrorHelperCore::Delegate implementation: | 90 // NetErrorHelperCore::Delegate implementation: |
88 void GenerateLocalizedErrorPage( | 91 void GenerateLocalizedErrorPage( |
89 const blink::WebURLError& error, | 92 const blink::WebURLError& error, |
90 bool is_failed_post, | 93 bool is_failed_post, |
91 scoped_ptr<error_page::ErrorPageParams> params, | 94 scoped_ptr<error_page::ErrorPageParams> params, |
92 bool* reload_button_shown, | 95 bool* reload_button_shown, |
93 bool* show_saved_copy_button_shown, | 96 bool* show_saved_copy_button_shown, |
94 std::string* html) const override; | 97 std::string* html) const override; |
95 void LoadErrorPageInMainFrame(const std::string& html, | 98 void LoadErrorPageInMainFrame(const std::string& html, |
(...skipping 25 matching lines...) Expand all Loading... |
121 | 124 |
122 scoped_ptr<content::ResourceFetcher> correction_fetcher_; | 125 scoped_ptr<content::ResourceFetcher> correction_fetcher_; |
123 scoped_ptr<content::ResourceFetcher> tracking_fetcher_; | 126 scoped_ptr<content::ResourceFetcher> tracking_fetcher_; |
124 | 127 |
125 scoped_ptr<error_page::NetErrorHelperCore> core_; | 128 scoped_ptr<error_page::NetErrorHelperCore> core_; |
126 | 129 |
127 DISALLOW_COPY_AND_ASSIGN(NetErrorHelper); | 130 DISALLOW_COPY_AND_ASSIGN(NetErrorHelper); |
128 }; | 131 }; |
129 | 132 |
130 #endif // CHROME_RENDERER_NET_NET_ERROR_HELPER_H_ | 133 #endif // CHROME_RENDERER_NET_NET_ERROR_HELPER_H_ |
OLD | NEW |