| 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 "chrome/browser/renderer_host/pepper/pepper_flash_browser_host.h" | 5 #include "chrome/browser/renderer_host/pepper/pepper_flash_browser_host.h" |
| 6 | 6 |
| 7 #include "base/time/time.h" | 7 #include "base/time/time.h" |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 #include "chrome/browser/content_settings/cookie_settings_factory.h" | 9 #include "chrome/browser/content_settings/cookie_settings_factory.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 // them on the IO thread. | 152 // them on the IO thread. |
| 153 if (!cookie_settings_.get()) { | 153 if (!cookie_settings_.get()) { |
| 154 cookie_settings_ = cookie_settings; | 154 cookie_settings_ = cookie_settings; |
| 155 } else { | 155 } else { |
| 156 DCHECK(cookie_settings_.get() == cookie_settings.get()); | 156 DCHECK(cookie_settings_.get() == cookie_settings.get()); |
| 157 } | 157 } |
| 158 | 158 |
| 159 PP_FlashLSORestrictions restrictions = PP_FLASHLSORESTRICTIONS_NONE; | 159 PP_FlashLSORestrictions restrictions = PP_FLASHLSORESTRICTIONS_NONE; |
| 160 if (cookie_settings_.get() && document_url.is_valid() && | 160 if (cookie_settings_.get() && document_url.is_valid() && |
| 161 plugin_url.is_valid()) { | 161 plugin_url.is_valid()) { |
| 162 if (!cookie_settings_->IsReadingCookieAllowed(document_url, plugin_url)) | 162 if (!cookie_settings_->IsCookieAccessAllowed(document_url, plugin_url)) |
| 163 restrictions = PP_FLASHLSORESTRICTIONS_BLOCK; | 163 restrictions = PP_FLASHLSORESTRICTIONS_BLOCK; |
| 164 else if (cookie_settings_->IsCookieSessionOnly(plugin_url)) | 164 else if (cookie_settings_->IsCookieSessionOnly(plugin_url)) |
| 165 restrictions = PP_FLASHLSORESTRICTIONS_IN_MEMORY; | 165 restrictions = PP_FLASHLSORESTRICTIONS_IN_MEMORY; |
| 166 } | 166 } |
| 167 SendReply(reply_context, | 167 SendReply(reply_context, |
| 168 PpapiPluginMsg_Flash_GetLocalDataRestrictionsReply( | 168 PpapiPluginMsg_Flash_GetLocalDataRestrictionsReply( |
| 169 static_cast<int32_t>(restrictions))); | 169 static_cast<int32_t>(restrictions))); |
| 170 } | 170 } |
| 171 | 171 |
| 172 } // namespace chrome | 172 } // namespace chrome |
| OLD | NEW |