| 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 <string> | 9 #include <string> |
| 9 | 10 |
| 10 #include "base/macros.h" | 11 #include "base/macros.h" |
| 11 #include "base/memory/scoped_ptr.h" | |
| 12 | 12 |
| 13 class GURL; | 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[]; |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 // Close the error and go back to the previous page. | 69 // Close the error and go back to the previous page. |
| 70 virtual void GoBack() = 0; | 70 virtual void GoBack() = 0; |
| 71 | 71 |
| 72 // Close the error and proceed to the blocked page. | 72 // Close the error and proceed to the blocked page. |
| 73 virtual void Proceed() = 0; | 73 virtual void Proceed() = 0; |
| 74 | 74 |
| 75 // Reload the blocked page to see if it succeeds now. | 75 // Reload the blocked page to see if it succeeds now. |
| 76 virtual void Reload() = 0; | 76 virtual void Reload() = 0; |
| 77 | 77 |
| 78 MetricsHelper* metrics_helper() const; | 78 MetricsHelper* metrics_helper() const; |
| 79 void set_metrics_helper(scoped_ptr<MetricsHelper> metrics_helper); | 79 void set_metrics_helper(std::unique_ptr<MetricsHelper> metrics_helper); |
| 80 | 80 |
| 81 virtual void OpenUrlInCurrentTab(const GURL& url) = 0; | 81 virtual void OpenUrlInCurrentTab(const GURL& url) = 0; |
| 82 | 82 |
| 83 protected: | 83 protected: |
| 84 virtual const std::string& GetApplicationLocale() = 0; | 84 virtual const std::string& GetApplicationLocale() = 0; |
| 85 virtual PrefService* GetPrefService() = 0; | 85 virtual PrefService* GetPrefService() = 0; |
| 86 virtual const std::string GetExtendedReportingPrefName() = 0; | 86 virtual const std::string GetExtendedReportingPrefName() = 0; |
| 87 | 87 |
| 88 private: | 88 private: |
| 89 scoped_ptr<MetricsHelper> metrics_helper_; | 89 std::unique_ptr<MetricsHelper> metrics_helper_; |
| 90 | 90 |
| 91 DISALLOW_COPY_AND_ASSIGN(ControllerClient); | 91 DISALLOW_COPY_AND_ASSIGN(ControllerClient); |
| 92 }; | 92 }; |
| 93 | 93 |
| 94 } // namespace security_interstitials | 94 } // namespace security_interstitials |
| 95 | 95 |
| 96 #endif // COMPONENTS_SECURITY_INTERSTITIALS_CORE_CONTROLLER_CLIENT_H_ | 96 #endif // COMPONENTS_SECURITY_INTERSTITIALS_CORE_CONTROLLER_CLIENT_H_ |
| OLD | NEW |