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

Side by Side Diff: chrome/browser/content_settings/mixed_content_settings_tab_helper.h

Issue 1905033002: PlzNavigate: Move navigation-level mixed content checks to the browser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@console-security-message
Patch Set: Now using shared scheme collections from url_util.h. 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
OLDNEW
(Empty)
1 // Copyright (c) 2017 The Chromium Authors. All rights reserved.
nasko 2017/01/23 22:32:38 nit: No "(c)" needed.
carlosk 2017/02/08 02:59:02 Done.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_MIXED_CONTENT_SETTINGS_TAB_HELPER_H_
6 #define CHROME_BROWSER_CONTENT_SETTINGS_MIXED_CONTENT_SETTINGS_TAB_HELPER_H_
7
8 #include "content/public/browser/web_contents_observer.h"
9 #include "content/public/browser/web_contents_user_data.h"
10
11 namespace content {
12 class SiteInstance;
13 }
14
15 // Controls mixed content related settings for the associated, working as the
nasko 2017/01/23 22:32:38 nit: associated what?
carlosk 2017/02/08 02:59:03 Done.
16 // browser version of the mixed content state kept by ContentSettingsObserver in
17 // the renderer.
18 class MixedContentSettingsTabHelper
19 : public content::WebContentsObserver,
20 public content::WebContentsUserData<MixedContentSettingsTabHelper> {
21 public:
22 ~MixedContentSettingsTabHelper() override;
23
24 // Enables running active mixed content resources in the associated
25 // WebContents/tab.
26 void AllowRunningOfInsecureContent();
27
28 bool is_running_insecure_content_allowed() {
29 return is_running_insecure_content_allowed_;
30 }
31
32 private:
33 friend class content::WebContentsUserData<MixedContentSettingsTabHelper>;
34
35 explicit MixedContentSettingsTabHelper(content::WebContents* tab);
36
37 void DidFinishNavigation(
38 content::NavigationHandle* navigation_handle) override;
39
40 // Members to control mixed content settings for the tab. They will be reset
41 // on cross-site main frame navigations.
42 content::SiteInstance* insecure_content_site_instance_ = nullptr;
43 bool is_running_insecure_content_allowed_ = false;
44
45 DISALLOW_COPY_AND_ASSIGN(MixedContentSettingsTabHelper);
46 };
47
48 #endif // CHROME_BROWSER_CONTENT_SETTINGS_MIXED_CONTENT_SETTINGS_TAB_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698