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

Side by Side Diff: components/security_interstitials/content/security_interstitial_page.h

Issue 2627343003: Update prefservice only if it is available. (Closed)
Patch Set: address code review Created 3 years, 11 months 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 | « no previous file | components/security_interstitials/content/security_interstitial_page.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 COMPONENTS_SECURITY_INTERSTITIALS_CONTENT_SECURITY_INTERSTITIAL_PAGE_H_ 5 #ifndef COMPONENTS_SECURITY_INTERSTITIALS_CONTENT_SECURITY_INTERSTITIAL_PAGE_H_
6 #define COMPONENTS_SECURITY_INTERSTITIALS_CONTENT_SECURITY_INTERSTITIAL_PAGE_H_ 6 #define COMPONENTS_SECURITY_INTERSTITIALS_CONTENT_SECURITY_INTERSTITIAL_PAGE_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 // InterstitialPageDelegate method: 57 // InterstitialPageDelegate method:
58 std::string GetHTMLContents() override; 58 std::string GetHTMLContents() override;
59 59
60 // Returns the formatted host name for the request url. 60 // Returns the formatted host name for the request url.
61 base::string16 GetFormattedHostName() const; 61 base::string16 GetFormattedHostName() const;
62 62
63 content::InterstitialPage* interstitial_page() const; 63 content::InterstitialPage* interstitial_page() const;
64 content::WebContents* web_contents() const; 64 content::WebContents* web_contents() const;
65 GURL request_url() const; 65 GURL request_url() const;
66 66
67 // Returns the boolean value of the given |pref|.
68 bool IsPrefEnabled(const char* pref);
69
70 SecurityInterstitialControllerClient* controller(); 67 SecurityInterstitialControllerClient* controller();
71 68
72 MetricsHelper* metrics_helper(); 69 MetricsHelper* metrics_helper();
73 70
74 private: 71 private:
75 // The WebContents with which this interstitial page is 72 // The WebContents with which this interstitial page is
76 // associated. Not available in ~SecurityInterstitialPage, since it 73 // associated. Not available in ~SecurityInterstitialPage, since it
77 // can be destroyed before this class is destroyed. 74 // can be destroyed before this class is destroyed.
78 content::WebContents* web_contents_; 75 content::WebContents* web_contents_;
79 const GURL request_url_; 76 const GURL request_url_;
80 // Once shown, |interstitial_page| takes ownership of this 77 // Once shown, |interstitial_page| takes ownership of this
81 // SecurityInterstitialPage instance. 78 // SecurityInterstitialPage instance.
82 content::InterstitialPage* interstitial_page_; 79 content::InterstitialPage* interstitial_page_;
83 // Whether the interstitial should create a view. 80 // Whether the interstitial should create a view.
84 bool create_view_; 81 bool create_view_;
85 // For subclasses that don't have their own ControllerClients yet. 82 // For subclasses that don't have their own ControllerClients yet.
86 std::unique_ptr<SecurityInterstitialControllerClient> controller_; 83 std::unique_ptr<SecurityInterstitialControllerClient> controller_;
87 84
88 std::unique_ptr<MetricsHelper> metrics_helper_; 85 std::unique_ptr<MetricsHelper> metrics_helper_;
89 86
90 DISALLOW_COPY_AND_ASSIGN(SecurityInterstitialPage); 87 DISALLOW_COPY_AND_ASSIGN(SecurityInterstitialPage);
91 }; 88 };
92 89
93 } // security_interstitials 90 } // security_interstitials
94 91
95 #endif // COMPONENTS_SECURITY_INTERSTITIALS_CONTENT_SECURITY_INTERSTITIAL_PAGE_ H_ 92 #endif // COMPONENTS_SECURITY_INTERSTITIALS_CONTENT_SECURITY_INTERSTITIAL_PAGE_ H_
OLDNEW
« no previous file with comments | « no previous file | components/security_interstitials/content/security_interstitial_page.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698