Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / components / error_page / common / error_page_params.h
blobc0b2203b9011a07ab8b40a09cf3a1ba183349ba8
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
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_NET_ERROR_COMMON_ERROR_PAGE_PARAMS_H_
6 #define COMPONENTS_NET_ERROR_COMMON_ERROR_PAGE_PARAMS_H_
8 #include <string>
10 #include "base/memory/scoped_ptr.h"
11 #include "url/gurl.h"
13 namespace base {
14 class ListValue;
17 namespace error_page {
19 // Optional parameters that affect the display of an error page.
20 struct ErrorPageParams {
21 ErrorPageParams();
22 ~ErrorPageParams();
24 // Overrides whether reloading is suggested.
25 bool suggest_reload;
26 int reload_tracking_id;
28 // Overrides default suggestions. Each entry must be a DictionaryValuethat
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
31 // default suggestions will be used.
32 scoped_ptr<base::ListValue> override_suggestions;
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
36 // conduct a search.
37 GURL search_url;
38 // Default search terms. Ignored if |search_url| is invalid.
39 std::string search_terms;
40 int search_tracking_id;
43 } // namespace error_page
45 #endif // COMPONENTS_NET_ERROR_COMMON_ERROR_PAGE_PARAMS_H_