| 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/ui/content_settings/content_setting_bubble_model.h" | 5 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/feature_list.h" | 10 #include "base/feature_list.h" |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 | 352 |
| 353 radio_group.radio_items.push_back(radio_allow_label); | 353 radio_group.radio_items.push_back(radio_allow_label); |
| 354 radio_group.radio_items.push_back(radio_block_label); | 354 radio_group.radio_items.push_back(radio_block_label); |
| 355 ContentSetting setting; | 355 ContentSetting setting; |
| 356 SettingSource setting_source = SETTING_SOURCE_NONE; | 356 SettingSource setting_source = SETTING_SOURCE_NONE; |
| 357 bool setting_is_wildcard = false; | 357 bool setting_is_wildcard = false; |
| 358 | 358 |
| 359 if (content_type() == CONTENT_SETTINGS_TYPE_COOKIES) { | 359 if (content_type() == CONTENT_SETTINGS_TYPE_COOKIES) { |
| 360 content_settings::CookieSettings* cookie_settings = | 360 content_settings::CookieSettings* cookie_settings = |
| 361 CookieSettingsFactory::GetForProfile(profile()).get(); | 361 CookieSettingsFactory::GetForProfile(profile()).get(); |
| 362 setting = cookie_settings->GetCookieSetting( | 362 cookie_settings->GetCookieSetting(url, url, &setting_source, nullptr, |
| 363 url, url, true, &setting_source); | 363 &setting); |
| 364 } else { | 364 } else { |
| 365 SettingInfo info; | 365 SettingInfo info; |
| 366 HostContentSettingsMap* map = | 366 HostContentSettingsMap* map = |
| 367 HostContentSettingsMapFactory::GetForProfile(profile()); | 367 HostContentSettingsMapFactory::GetForProfile(profile()); |
| 368 std::unique_ptr<base::Value> value = | 368 std::unique_ptr<base::Value> value = |
| 369 map->GetWebsiteSetting(url, url, content_type(), std::string(), &info); | 369 map->GetWebsiteSetting(url, url, content_type(), std::string(), &info); |
| 370 setting = content_settings::ValueToContentSetting(value.get()); | 370 setting = content_settings::ValueToContentSetting(value.get()); |
| 371 setting_source = info.source; | 371 setting_source = info.source; |
| 372 setting_is_wildcard = | 372 setting_is_wildcard = |
| 373 info.primary_pattern == ContentSettingsPattern::Wildcard() && | 373 info.primary_pattern == ContentSettingsPattern::Wildcard() && |
| (...skipping 1094 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1468 ContentSettingMediaStreamBubbleModel* | 1468 ContentSettingMediaStreamBubbleModel* |
| 1469 ContentSettingBubbleModel::AsMediaStreamBubbleModel() { | 1469 ContentSettingBubbleModel::AsMediaStreamBubbleModel() { |
| 1470 // In general, bubble models might not inherit from the media bubble model. | 1470 // In general, bubble models might not inherit from the media bubble model. |
| 1471 return nullptr; | 1471 return nullptr; |
| 1472 } | 1472 } |
| 1473 | 1473 |
| 1474 ContentSettingSubresourceFilterBubbleModel* | 1474 ContentSettingSubresourceFilterBubbleModel* |
| 1475 ContentSettingBubbleModel::AsSubresourceFilterBubbleModel() { | 1475 ContentSettingBubbleModel::AsSubresourceFilterBubbleModel() { |
| 1476 return nullptr; | 1476 return nullptr; |
| 1477 } | 1477 } |
| OLD | NEW |