| 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 "content/browser/renderer_host/media/media_stream_manager.h" | 5 #include "content/browser/renderer_host/media/media_stream_manager.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 1956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1967 std::string guid_from_raw_device_id = | 1967 std::string guid_from_raw_device_id = |
| 1968 GetHMACForMediaDeviceID(salt, security_origin, raw_unique_id); | 1968 GetHMACForMediaDeviceID(salt, security_origin, raw_unique_id); |
| 1969 return guid_from_raw_device_id == device_guid; | 1969 return guid_from_raw_device_id == device_guid; |
| 1970 } | 1970 } |
| 1971 | 1971 |
| 1972 // static | 1972 // static |
| 1973 bool MediaStreamManager::IsOriginAllowed(int render_process_id, | 1973 bool MediaStreamManager::IsOriginAllowed(int render_process_id, |
| 1974 const url::Origin& origin) { | 1974 const url::Origin& origin) { |
| 1975 if (!ChildProcessSecurityPolicyImpl::GetInstance()->CanRequestURL( | 1975 if (!ChildProcessSecurityPolicyImpl::GetInstance()->CanRequestURL( |
| 1976 render_process_id, origin.GetURL())) { | 1976 render_process_id, origin.GetURL())) { |
| 1977 LOG(ERROR) << "MSM: Renderer requested a URL it's not allowed to use."; | 1977 LOG(ERROR) << "MSM: Renderer requested a URL it's not allowed to use: " |
| 1978 << origin.Serialize(); |
| 1978 return false; | 1979 return false; |
| 1979 } | 1980 } |
| 1980 | 1981 |
| 1981 return true; | 1982 return true; |
| 1982 } | 1983 } |
| 1983 | 1984 |
| 1984 void MediaStreamManager::SetCapturingLinkSecured(int render_process_id, | 1985 void MediaStreamManager::SetCapturingLinkSecured(int render_process_id, |
| 1985 int session_id, | 1986 int session_id, |
| 1986 content::MediaStreamType type, | 1987 content::MediaStreamType type, |
| 1987 bool is_secure) { | 1988 bool is_secure) { |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2043 } | 2044 } |
| 2044 } | 2045 } |
| 2045 } | 2046 } |
| 2046 | 2047 |
| 2047 void MediaStreamManager::SetGenerateStreamCallbackForTesting( | 2048 void MediaStreamManager::SetGenerateStreamCallbackForTesting( |
| 2048 GenerateStreamTestCallback test_callback) { | 2049 GenerateStreamTestCallback test_callback) { |
| 2049 generate_stream_test_callback_ = test_callback; | 2050 generate_stream_test_callback_ = test_callback; |
| 2050 } | 2051 } |
| 2051 | 2052 |
| 2052 } // namespace content | 2053 } // namespace content |
| OLD | NEW |