Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "url/gurl.h" | |
| 12 | 13 |
| 13 class GURL; | |
| 14 class PrefService; | 14 class PrefService; |
| 15 | 15 |
| 16 namespace security_interstitials { | 16 namespace security_interstitials { |
| 17 | 17 |
| 18 class MetricsHelper; | 18 class MetricsHelper; |
| 19 | 19 |
| 20 // Constants used to communicate with the JavaScript. | 20 // Constants used to communicate with the JavaScript. |
| 21 extern const char kBoxChecked[]; | 21 extern const char kBoxChecked[]; |
| 22 extern const char kDisplayCheckBox[]; | 22 extern const char kDisplayCheckBox[]; |
| 23 extern const char kOptInLink[]; | 23 extern const char kOptInLink[]; |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 80 virtual void GoBackAfterNavigationCommitted() = 0; | 80 virtual void GoBackAfterNavigationCommitted() = 0; |
| 81 | 81 |
| 82 // Close the error and proceed to the blocked page. | 82 // Close the error and proceed to the blocked page. |
| 83 virtual void Proceed() = 0; | 83 virtual void Proceed() = 0; |
| 84 | 84 |
| 85 // Reload the blocked page to see if it succeeds now. | 85 // Reload the blocked page to see if it succeeds now. |
| 86 virtual void Reload() = 0; | 86 virtual void Reload() = 0; |
| 87 | 87 |
| 88 MetricsHelper* metrics_helper() const; | 88 MetricsHelper* metrics_helper() const; |
| 89 | 89 |
| 90 virtual void OpenUrlInNewForegroundTab(const GURL& url) = 0; | |
| 91 | |
| 90 virtual void OpenUrlInCurrentTab(const GURL& url) = 0; | 92 virtual void OpenUrlInCurrentTab(const GURL& url) = 0; |
|
estark
2017/06/27 00:36:22
Is this still used anywhere? Can we get rid of it?
sperigo
2017/06/27 17:31:59
I don't think so! I left it in in case there was a
| |
| 91 | 93 |
| 92 virtual PrefService* GetPrefService() = 0; | 94 virtual PrefService* GetPrefService() = 0; |
| 93 | 95 |
| 94 virtual const std::string& GetApplicationLocale() const = 0; | 96 virtual const std::string& GetApplicationLocale() const = 0; |
| 95 | 97 |
| 98 GURL GetBaseHelpCenterUrl() const; | |
| 99 | |
| 100 void SetBaseHelpCenterUrlForTesting(const GURL& test_url); | |
| 101 | |
| 96 protected: | 102 protected: |
| 97 virtual const std::string GetExtendedReportingPrefName() const = 0; | 103 virtual const std::string GetExtendedReportingPrefName() const = 0; |
| 98 | 104 |
| 99 private: | 105 private: |
| 100 std::unique_ptr<MetricsHelper> metrics_helper_; | 106 std::unique_ptr<MetricsHelper> metrics_helper_; |
| 107 // Link to the help center. | |
| 108 GURL help_center_url_; | |
| 101 | 109 |
| 102 DISALLOW_COPY_AND_ASSIGN(ControllerClient); | 110 DISALLOW_COPY_AND_ASSIGN(ControllerClient); |
| 103 }; | 111 }; |
| 104 | 112 |
| 105 } // namespace security_interstitials | 113 } // namespace security_interstitials |
| 106 | 114 |
| 107 #endif // COMPONENTS_SECURITY_INTERSTITIALS_CORE_CONTROLLER_CLIENT_H_ | 115 #endif // COMPONENTS_SECURITY_INTERSTITIALS_CORE_CONTROLLER_CLIENT_H_ |
| OLD | NEW |