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

Side by Side Diff: components/security_interstitials/core/controller_client.h

Issue 1481213003: Componentize the bad clock blocking page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change for pkasting Created 5 years 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
« no previous file with comments | « components/security_interstitials/core/common_string_util.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_SECURITY_INTERSTITIALS_CORE_CONTROLLER_CLIENT_H_ 5 #ifndef COMPONENTS_SECURITY_INTERSTITIALS_CORE_CONTROLLER_CLIENT_H_
6 #define COMPONENTS_SECURITY_INTERSTITIALS_CORE_CONTROLLER_CLIENT_H_ 6 #define COMPONENTS_SECURITY_INTERSTITIALS_CORE_CONTROLLER_CLIENT_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 CMD_OPEN_LOGIN = 7, 44 CMD_OPEN_LOGIN = 7,
45 // Safe Browsing Extended Reporting 45 // Safe Browsing Extended Reporting
46 CMD_DO_REPORT = 8, 46 CMD_DO_REPORT = 8,
47 CMD_DONT_REPORT = 9, 47 CMD_DONT_REPORT = 9,
48 CMD_OPEN_REPORTING_PRIVACY = 10, 48 CMD_OPEN_REPORTING_PRIVACY = 10,
49 // Report a phishing error 49 // Report a phishing error
50 CMD_REPORT_PHISHING_ERROR = 11, 50 CMD_REPORT_PHISHING_ERROR = 11,
51 }; 51 };
52 52
53 // Provides methods for handling commands from the user, which requires some 53 // Provides methods for handling commands from the user, which requires some
54 // embedder-specific abstraction. 54 // embedder-specific abstraction. This class should handle all commands sent
55 // by the JavaScript error page.
55 class ControllerClient { 56 class ControllerClient {
56 public: 57 public:
57 ControllerClient(); 58 ControllerClient();
58 virtual ~ControllerClient(); 59 virtual ~ControllerClient();
59 60
60 // Handle the user's reporting preferences. 61 // Handle the user's reporting preferences.
61 void SetReportingPreference(bool report); 62 void SetReportingPreference(bool report);
62 void OpenExtendedReportingPrivacyPolicy(); 63 void OpenExtendedReportingPrivacyPolicy();
63 64
65 // If available, open the operating system's date/time settings.
66 virtual bool CanLaunchDateAndTimeSettings() = 0;
67 virtual void LaunchDateAndTimeSettings() = 0;
68
69 // Close the error and go back to the previous page.
70 virtual void GoBack() = 0;
71
64 MetricsHelper* metrics_helper() const; 72 MetricsHelper* metrics_helper() const;
65 void set_metrics_helper(scoped_ptr<MetricsHelper> metrics_helper); 73 void set_metrics_helper(scoped_ptr<MetricsHelper> metrics_helper);
66 74
67 protected: 75 protected:
68 virtual void OpenUrlInCurrentTab(const GURL& url) = 0; 76 virtual void OpenUrlInCurrentTab(const GURL& url) = 0;
69 77
70 virtual const std::string& GetApplicationLocale() = 0; 78 virtual const std::string& GetApplicationLocale() = 0;
71 virtual PrefService* GetPrefService() = 0; 79 virtual PrefService* GetPrefService() = 0;
72 virtual const std::string GetExtendedReportingPrefName() = 0; 80 virtual const std::string GetExtendedReportingPrefName() = 0;
73 81
74 private: 82 private:
75 scoped_ptr<MetricsHelper> metrics_helper_; 83 scoped_ptr<MetricsHelper> metrics_helper_;
76 84
77 DISALLOW_COPY_AND_ASSIGN(ControllerClient); 85 DISALLOW_COPY_AND_ASSIGN(ControllerClient);
78 }; 86 };
79 87
80 } // namespace security_interstitials 88 } // namespace security_interstitials
81 89
82 #endif // COMPONENTS_SECURITY_INTERSTITIALS_CORE_CONTROLLER_CLIENT_H_ 90 #endif // COMPONENTS_SECURITY_INTERSTITIALS_CORE_CONTROLLER_CLIENT_H_
OLDNEW
« no previous file with comments | « components/security_interstitials/core/common_string_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698