| 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 "chrome/browser/permissions/permission_context_base.h" | 5 #include "chrome/browser/permissions/permission_context_base.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 PermissionDecisionAutoBlocker::GetForProfile(profile_) | 212 PermissionDecisionAutoBlocker::GetForProfile(profile_) |
| 213 ->GetEmbargoResult(requesting_origin, content_settings_type_); | 213 ->GetEmbargoResult(requesting_origin, content_settings_type_); |
| 214 DCHECK(result.content_setting == CONTENT_SETTING_ASK || | 214 DCHECK(result.content_setting == CONTENT_SETTING_ASK || |
| 215 result.content_setting == CONTENT_SETTING_BLOCK); | 215 result.content_setting == CONTENT_SETTING_BLOCK); |
| 216 return result; | 216 return result; |
| 217 } | 217 } |
| 218 | 218 |
| 219 return PermissionResult(content_setting, PermissionStatusSource::UNSPECIFIED); | 219 return PermissionResult(content_setting, PermissionStatusSource::UNSPECIFIED); |
| 220 } | 220 } |
| 221 | 221 |
| 222 PermissionResult PermissionContextBase::UpdatePermissionStatusWithDeviceStatus( |
| 223 PermissionResult result, |
| 224 const GURL& requesting_origin, |
| 225 const GURL& embedding_origin) const { |
| 226 return result; |
| 227 } |
| 228 |
| 222 void PermissionContextBase::ResetPermission(const GURL& requesting_origin, | 229 void PermissionContextBase::ResetPermission(const GURL& requesting_origin, |
| 223 const GURL& embedding_origin) { | 230 const GURL& embedding_origin) { |
| 224 HostContentSettingsMapFactory::GetForProfile(profile_) | 231 HostContentSettingsMapFactory::GetForProfile(profile_) |
| 225 ->SetContentSettingDefaultScope(requesting_origin, embedding_origin, | 232 ->SetContentSettingDefaultScope(requesting_origin, embedding_origin, |
| 226 content_settings_storage_type(), | 233 content_settings_storage_type(), |
| 227 std::string(), CONTENT_SETTING_DEFAULT); | 234 std::string(), CONTENT_SETTING_DEFAULT); |
| 228 } | 235 } |
| 229 | 236 |
| 230 void PermissionContextBase::CancelPermissionRequest( | 237 void PermissionContextBase::CancelPermissionRequest( |
| 231 content::WebContents* web_contents, | 238 content::WebContents* web_contents, |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 408 content_settings_storage_type(), | 415 content_settings_storage_type(), |
| 409 std::string(), content_setting); | 416 std::string(), content_setting); |
| 410 } | 417 } |
| 411 | 418 |
| 412 ContentSettingsType PermissionContextBase::content_settings_storage_type() | 419 ContentSettingsType PermissionContextBase::content_settings_storage_type() |
| 413 const { | 420 const { |
| 414 if (content_settings_type_ == CONTENT_SETTINGS_TYPE_PUSH_MESSAGING) | 421 if (content_settings_type_ == CONTENT_SETTINGS_TYPE_PUSH_MESSAGING) |
| 415 return CONTENT_SETTINGS_TYPE_NOTIFICATIONS; | 422 return CONTENT_SETTINGS_TYPE_NOTIFICATIONS; |
| 416 return content_settings_type_; | 423 return content_settings_type_; |
| 417 } | 424 } |
| OLD | NEW |