OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 CHROME_BROWSER_INTERSTITIALS_SECURITY_INTERSTITIAL_PAGE_H_ | 5 #ifndef CHROME_BROWSER_INTERSTITIALS_SECURITY_INTERSTITIAL_PAGE_H_ |
6 #define CHROME_BROWSER_INTERSTITIALS_SECURITY_INTERSTITIAL_PAGE_H_ | 6 #define CHROME_BROWSER_INTERSTITIALS_SECURITY_INTERSTITIAL_PAGE_H_ |
7 | 7 |
| 8 #include <memory> |
| 9 |
8 #include "base/macros.h" | 10 #include "base/macros.h" |
9 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
10 #include "content/public/browser/interstitial_page_delegate.h" | 12 #include "content/public/browser/interstitial_page_delegate.h" |
11 #include "url/gurl.h" | 13 #include "url/gurl.h" |
12 | 14 |
13 namespace base { | 15 namespace base { |
14 class DictionaryValue; | 16 class DictionaryValue; |
15 } | 17 } |
16 | 18 |
17 namespace content { | 19 namespace content { |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 // Profile associated with |web_contents_|. | 65 // Profile associated with |web_contents_|. |
64 bool IsPrefEnabled(const char* pref); | 66 bool IsPrefEnabled(const char* pref); |
65 | 67 |
66 // TODO(felt): Remove these. They are temporary methods, used to pass along | 68 // TODO(felt): Remove these. They are temporary methods, used to pass along |
67 // calls to the |controller_| for subclasses that don't yet have their own | 69 // calls to the |controller_| for subclasses that don't yet have their own |
68 // ChromeControllerClients. crbug.com/488673 | 70 // ChromeControllerClients. crbug.com/488673 |
69 void SetReportingPreference(bool report); | 71 void SetReportingPreference(bool report); |
70 void OpenExtendedReportingPrivacyPolicy(); | 72 void OpenExtendedReportingPrivacyPolicy(); |
71 security_interstitials::MetricsHelper* metrics_helper(); | 73 security_interstitials::MetricsHelper* metrics_helper(); |
72 void set_metrics_helper( | 74 void set_metrics_helper( |
73 scoped_ptr<security_interstitials::MetricsHelper> metrics_helper); | 75 std::unique_ptr<security_interstitials::MetricsHelper> metrics_helper); |
74 | 76 |
75 private: | 77 private: |
76 // The WebContents with which this interstitial page is | 78 // The WebContents with which this interstitial page is |
77 // associated. Not available in ~SecurityInterstitialPage, since it | 79 // associated. Not available in ~SecurityInterstitialPage, since it |
78 // can be destroyed before this class is destroyed. | 80 // can be destroyed before this class is destroyed. |
79 content::WebContents* web_contents_; | 81 content::WebContents* web_contents_; |
80 const GURL request_url_; | 82 const GURL request_url_; |
81 // Once shown, |interstitial_page| takes ownership of this | 83 // Once shown, |interstitial_page| takes ownership of this |
82 // SecurityInterstitialPage instance. | 84 // SecurityInterstitialPage instance. |
83 content::InterstitialPage* interstitial_page_; | 85 content::InterstitialPage* interstitial_page_; |
84 // Whether the interstitial should create a view. | 86 // Whether the interstitial should create a view. |
85 bool create_view_; | 87 bool create_view_; |
86 // For subclasses that don't have their own ChromeControllerClients yet. | 88 // For subclasses that don't have their own ChromeControllerClients yet. |
87 scoped_ptr<ChromeControllerClient> controller_; | 89 std::unique_ptr<ChromeControllerClient> controller_; |
88 | 90 |
89 DISALLOW_COPY_AND_ASSIGN(SecurityInterstitialPage); | 91 DISALLOW_COPY_AND_ASSIGN(SecurityInterstitialPage); |
90 }; | 92 }; |
91 | 93 |
92 #endif // CHROME_BROWSER_INTERSTITIALS_SECURITY_INTERSTITIAL_PAGE_H_ | 94 #endif // CHROME_BROWSER_INTERSTITIALS_SECURITY_INTERSTITIAL_PAGE_H_ |
OLD | NEW |