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 #include "content/shell/browser/layout_test/layout_test_content_browser_client.h
" | 5 #include "content/shell/browser/layout_test/layout_test_content_browser_client.h
" |
6 | 6 |
7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
8 #include "content/public/browser/browser_context.h" | 8 #include "content/public/browser/browser_context.h" |
9 #include "content/public/browser/browser_thread.h" | 9 #include "content/public/browser/browser_thread.h" |
10 #include "content/public/browser/render_process_host.h" | 10 #include "content/public/browser/render_process_host.h" |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 StoragePartition* partition, | 133 StoragePartition* partition, |
134 const storage::OptionalQuotaSettingsCallback& callback) { | 134 const storage::OptionalQuotaSettingsCallback& callback) { |
135 callback.Run(storage::GetHardCodedSettings(5 * 1024 * 1024)); | 135 callback.Run(storage::GetHardCodedSettings(5 * 1024 * 1024)); |
136 } | 136 } |
137 | 137 |
138 PlatformNotificationService* | 138 PlatformNotificationService* |
139 LayoutTestContentBrowserClient::GetPlatformNotificationService() { | 139 LayoutTestContentBrowserClient::GetPlatformNotificationService() { |
140 return layout_test_notification_manager_.get(); | 140 return layout_test_notification_manager_.get(); |
141 } | 141 } |
142 | 142 |
| 143 bool LayoutTestContentBrowserClient::ShouldAllowRunningInsecureContent( |
| 144 bool allowed_per_settings, |
| 145 const url::Origin& origin, |
| 146 const GURL& resource_url, |
| 147 content::WebContents* web_contents) { |
| 148 const base::DictionaryValue& test_flags = |
| 149 BlinkTestController::Get() |
| 150 ->accumulated_layout_test_runtime_flags_changes(); |
| 151 bool allow_running = false; |
| 152 test_flags.GetBoolean("running_insecure_content_allowed", &allow_running); |
| 153 |
| 154 return allowed_per_settings || allow_running; |
| 155 } |
| 156 |
143 } // namespace content | 157 } // namespace content |
OLD | NEW |