| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <algorithm> | 5 #include <algorithm> |
| 6 #include <string> | 6 #include <string> |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 2910 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2921 CommandLine::ForCurrentProcess()->AppendSwitch(switches::kKioskMode); | 2921 CommandLine::ForCurrentProcess()->AppendSwitch(switches::kKioskMode); |
| 2922 | 2922 |
| 2923 // Add an entry to the whitelist that allows the specified URL regardless | 2923 // Add an entry to the whitelist that allows the specified URL regardless |
| 2924 // of the setting of kAudioCapturedAllowed. | 2924 // of the setting of kAudioCapturedAllowed. |
| 2925 request_url_ = GURL("http://www.example.com/foo"); | 2925 request_url_ = GURL("http://www.example.com/foo"); |
| 2926 base::ListValue* list = new base::ListValue(); | 2926 base::ListValue* list = new base::ListValue(); |
| 2927 if (allow_rule) { | 2927 if (allow_rule) { |
| 2928 list->AppendString(allow_rule); | 2928 list->AppendString(allow_rule); |
| 2929 request_url_allowed_via_whitelist_ = true; | 2929 request_url_allowed_via_whitelist_ = true; |
| 2930 } else { | 2930 } else { |
| 2931 list->AppendString(ContentSettingsPattern::Wildcard().ToString()); | 2931 list->AppendString(ContentSettingsPattern::Wildcard().ToString( |
| 2932 extensions::kExtensionScheme)); |
| 2932 // We should ignore all wildcard entries in the whitelist, so even | 2933 // We should ignore all wildcard entries in the whitelist, so even |
| 2933 // though we've added an entry, it should be ignored and our expectation | 2934 // though we've added an entry, it should be ignored and our expectation |
| 2934 // is that the request has not been allowed via the whitelist. | 2935 // is that the request has not been allowed via the whitelist. |
| 2935 request_url_allowed_via_whitelist_ = false; | 2936 request_url_allowed_via_whitelist_ = false; |
| 2936 } | 2937 } |
| 2937 policies->Set(whitelist_policy, POLICY_LEVEL_MANDATORY, | 2938 policies->Set(whitelist_policy, POLICY_LEVEL_MANDATORY, |
| 2938 POLICY_SCOPE_USER, list, NULL); | 2939 POLICY_SCOPE_USER, list, NULL); |
| 2939 } | 2940 } |
| 2940 } | 2941 } |
| 2941 | 2942 |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3213 EXPECT_TRUE(content::ExecuteScriptAndExtractBool( | 3214 EXPECT_TRUE(content::ExecuteScriptAndExtractBool( |
| 3214 browser2->tab_strip_model()->GetActiveWebContents(), | 3215 browser2->tab_strip_model()->GetActiveWebContents(), |
| 3215 "domAutomationController.send(window.showModalDialog !== undefined);", | 3216 "domAutomationController.send(window.showModalDialog !== undefined);", |
| 3216 &result)); | 3217 &result)); |
| 3217 EXPECT_TRUE(result); | 3218 EXPECT_TRUE(result); |
| 3218 } | 3219 } |
| 3219 | 3220 |
| 3220 #endif // !defined(CHROME_OS) | 3221 #endif // !defined(CHROME_OS) |
| 3221 | 3222 |
| 3222 } // namespace policy | 3223 } // namespace policy |
| OLD | NEW |