| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_NET_ERROR_COMMON_ERROR_PAGE_PARAMS_H_ | 5 #ifndef COMPONENTS_NET_ERROR_COMMON_ERROR_PAGE_PARAMS_H_ |
| 6 #define COMPONENTS_NET_ERROR_COMMON_ERROR_PAGE_PARAMS_H_ | 6 #define COMPONENTS_NET_ERROR_COMMON_ERROR_PAGE_PARAMS_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 8 #include <string> | 9 #include <string> |
| 9 | 10 |
| 10 #include "base/memory/scoped_ptr.h" | |
| 11 #include "url/gurl.h" | 11 #include "url/gurl.h" |
| 12 | 12 |
| 13 namespace base { | 13 namespace base { |
| 14 class ListValue; | 14 class ListValue; |
| 15 } | 15 } |
| 16 | 16 |
| 17 namespace error_page { | 17 namespace error_page { |
| 18 | 18 |
| 19 // Optional parameters that affect the display of an error page. | 19 // Optional parameters that affect the display of an error page. |
| 20 struct ErrorPageParams { | 20 struct ErrorPageParams { |
| 21 ErrorPageParams(); | 21 ErrorPageParams(); |
| 22 ~ErrorPageParams(); | 22 ~ErrorPageParams(); |
| 23 | 23 |
| 24 // Overrides whether reloading is suggested. | 24 // Overrides whether reloading is suggested. |
| 25 bool suggest_reload; | 25 bool suggest_reload; |
| 26 int reload_tracking_id; | 26 int reload_tracking_id; |
| 27 | 27 |
| 28 // Overrides default suggestions. Each entry must be a DictionaryValuethat | 28 // Overrides default suggestions. Each entry must be a DictionaryValuethat |
| 29 // contains a "header" entry. A "body" entry may optionally be specified. | 29 // contains a "header" entry. A "body" entry may optionally be specified. |
| 30 // JSTemplate evaluation will be applied when added to the DOM. If NULL, the | 30 // JSTemplate evaluation will be applied when added to the DOM. If NULL, the |
| 31 // default suggestions will be used. | 31 // default suggestions will be used. |
| 32 scoped_ptr<base::ListValue> override_suggestions; | 32 std::unique_ptr<base::ListValue> override_suggestions; |
| 33 | 33 |
| 34 // Prefix to prepend to search terms. Search box is only shown if this is | 34 // Prefix to prepend to search terms. Search box is only shown if this is |
| 35 // a valid url. The search terms will be appended to the end of this URL to | 35 // a valid url. The search terms will be appended to the end of this URL to |
| 36 // conduct a search. | 36 // conduct a search. |
| 37 GURL search_url; | 37 GURL search_url; |
| 38 // Default search terms. Ignored if |search_url| is invalid. | 38 // Default search terms. Ignored if |search_url| is invalid. |
| 39 std::string search_terms; | 39 std::string search_terms; |
| 40 int search_tracking_id; | 40 int search_tracking_id; |
| 41 }; | 41 }; |
| 42 | 42 |
| 43 } // namespace error_page | 43 } // namespace error_page |
| 44 | 44 |
| 45 #endif // COMPONENTS_NET_ERROR_COMMON_ERROR_PAGE_PARAMS_H_ | 45 #endif // COMPONENTS_NET_ERROR_COMMON_ERROR_PAGE_PARAMS_H_ |
| OLD | NEW |