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

Side by Side Diff: components/test_runner/mock_content_settings_client.cc

Issue 2278303002: Remove the allow-displaying-mixed-content setting from Blink. (Closed)
Patch Set: Fixed missign deprecated preference registration. Created 4 years, 3 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
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 #include "components/test_runner/mock_content_settings_client.h" 5 #include "components/test_runner/mock_content_settings_client.h"
6 6
7 #include "components/test_runner/layout_test_runtime_flags.h" 7 #include "components/test_runner/layout_test_runtime_flags.h"
8 #include "components/test_runner/test_common.h" 8 #include "components/test_runner/test_common.h"
9 #include "components/test_runner/web_test_delegate.h" 9 #include "components/test_runner/web_test_delegate.h"
10 #include "third_party/WebKit/public/platform/WebURL.h" 10 #include "third_party/WebKit/public/platform/WebURL.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 } 47 }
48 48
49 bool MockContentSettingsClient::allowStorage(bool enabled_per_settings) { 49 bool MockContentSettingsClient::allowStorage(bool enabled_per_settings) {
50 return flags_->storage_allowed(); 50 return flags_->storage_allowed();
51 } 51 }
52 52
53 bool MockContentSettingsClient::allowPlugins(bool enabled_per_settings) { 53 bool MockContentSettingsClient::allowPlugins(bool enabled_per_settings) {
54 return enabled_per_settings && flags_->plugins_allowed(); 54 return enabled_per_settings && flags_->plugins_allowed();
55 } 55 }
56 56
57 bool MockContentSettingsClient::allowDisplayingInsecureContent(
58 bool enabled_per_settings,
59 const blink::WebURL& url) {
60 return enabled_per_settings || flags_->displaying_insecure_content_allowed();
61 }
62
63 bool MockContentSettingsClient::allowRunningInsecureContent( 57 bool MockContentSettingsClient::allowRunningInsecureContent(
64 bool enabled_per_settings, 58 bool enabled_per_settings,
65 const blink::WebSecurityOrigin& context, 59 const blink::WebSecurityOrigin& context,
66 const blink::WebURL& url) { 60 const blink::WebURL& url) {
67 return enabled_per_settings || flags_->running_insecure_content_allowed(); 61 return enabled_per_settings || flags_->running_insecure_content_allowed();
68 } 62 }
69 63
70 bool MockContentSettingsClient::allowAutoplay(bool default_value) { 64 bool MockContentSettingsClient::allowAutoplay(bool default_value) {
71 return default_value || flags_->autoplay_allowed(); 65 return default_value || flags_->autoplay_allowed();
72 } 66 }
73 67
74 void MockContentSettingsClient::SetDelegate(WebTestDelegate* delegate) { 68 void MockContentSettingsClient::SetDelegate(WebTestDelegate* delegate) {
75 delegate_ = delegate; 69 delegate_ = delegate;
76 } 70 }
77 71
78 } // namespace test_runner 72 } // namespace test_runner
OLDNEW
« no previous file with comments | « components/test_runner/mock_content_settings_client.h ('k') | components/test_runner/test_preferences.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698