| Index: components/security_interstitials/core/safe_browsing_quiet_error_ui.h
|
| diff --git a/components/security_interstitials/core/safe_browsing_quiet_error_ui.h b/components/security_interstitials/core/safe_browsing_quiet_error_ui.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..d0f59120ec0fb90bb1ca6e5e00e9153c899d6b1f
|
| --- /dev/null
|
| +++ b/components/security_interstitials/core/safe_browsing_quiet_error_ui.h
|
| @@ -0,0 +1,50 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef COMPONENTS_SECURITY_INTERSTITIALS_CORE_SAFE_BROWSING_QUIET_ERROR_UI_H_
|
| +#define COMPONENTS_SECURITY_INTERSTITIALS_CORE_SAFE_BROWSING_QUIET_ERROR_UI_H_
|
| +
|
| +#include "base/macros.h"
|
| +#include "base/time/time.h"
|
| +#include "base/values.h"
|
| +#include "components/security_interstitials/core/controller_client.h"
|
| +#include "components/security_interstitials/core/safe_browsing_error_ui.h"
|
| +#include "url/gurl.h"
|
| +
|
| +namespace security_interstitials {
|
| +
|
| +// This class displays UI for Safe Browsing errors that block page loads. This
|
| +// class is purely about visual display; it does not do any error-handling logic
|
| +// to determine what type of error should be displayed when.
|
| +class SafeBrowsingQuietErrorUI {
|
| + public:
|
| + SafeBrowsingQuietErrorUI(
|
| + const GURL& request_url,
|
| + const GURL& main_frame_url,
|
| + SafeBrowsingErrorUI::SBInterstitialReason reason,
|
| + const SafeBrowsingErrorUI::SBErrorDisplayOptions& display_options,
|
| + ControllerClient* controller);
|
| + ~SafeBrowsingQuietErrorUI();
|
| +
|
| + void PopulateStringsForHTML(base::DictionaryValue* load_time_data);
|
| +
|
| + private:
|
| + // Fills the passed dictionary with the values to be passed to the template
|
| + // when creating the HTML.
|
| + void PopulateMalwareLoadTimeData(base::DictionaryValue* load_time_data);
|
| + void PopulatePhishingLoadTimeData(base::DictionaryValue* load_time_data);
|
| +
|
| + const GURL request_url_;
|
| + const GURL main_frame_url_;
|
| + const SafeBrowsingErrorUI::SBInterstitialReason interstitial_reason_;
|
| + SafeBrowsingErrorUI::SBErrorDisplayOptions display_options_;
|
| +
|
| + ControllerClient* controller_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(SafeBrowsingQuietErrorUI);
|
| +};
|
| +
|
| +} // security_interstitials
|
| +
|
| +#endif // COMPONENTS_SECURITY_INTERSTITIALS_CORE_SAFE_BROWSING_QUIET_ERROR_UI_H_
|
|
|