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 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 } | 338 } |
339 | 339 |
340 radio_group.radio_items.push_back(radio_allow_label); | 340 radio_group.radio_items.push_back(radio_allow_label); |
341 radio_group.radio_items.push_back(radio_block_label); | 341 radio_group.radio_items.push_back(radio_block_label); |
342 ContentSetting setting; | 342 ContentSetting setting; |
343 SettingSource setting_source = SETTING_SOURCE_NONE; | 343 SettingSource setting_source = SETTING_SOURCE_NONE; |
344 | 344 |
345 if (content_type() == CONTENT_SETTINGS_TYPE_COOKIES) { | 345 if (content_type() == CONTENT_SETTINGS_TYPE_COOKIES) { |
346 content_settings::CookieSettings* cookie_settings = | 346 content_settings::CookieSettings* cookie_settings = |
347 CookieSettingsFactory::GetForProfile(profile()).get(); | 347 CookieSettingsFactory::GetForProfile(profile()).get(); |
348 cookie_settings->GetCookieSetting(url, url, &setting_source, nullptr, | 348 cookie_settings->GetCookieSetting(url, url, &setting_source, &setting); |
349 &setting); | |
350 } else { | 349 } else { |
351 SettingInfo info; | 350 SettingInfo info; |
352 HostContentSettingsMap* map = | 351 HostContentSettingsMap* map = |
353 HostContentSettingsMapFactory::GetForProfile(profile()); | 352 HostContentSettingsMapFactory::GetForProfile(profile()); |
354 std::unique_ptr<base::Value> value = | 353 std::unique_ptr<base::Value> value = |
355 map->GetWebsiteSetting(url, url, content_type(), std::string(), &info); | 354 map->GetWebsiteSetting(url, url, content_type(), std::string(), &info); |
356 setting = content_settings::ValueToContentSetting(value.get()); | 355 setting = content_settings::ValueToContentSetting(value.get()); |
357 setting_source = info.source; | 356 setting_source = info.source; |
358 } | 357 } |
359 | 358 |
(...skipping 1096 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1456 ContentSettingMediaStreamBubbleModel* | 1455 ContentSettingMediaStreamBubbleModel* |
1457 ContentSettingBubbleModel::AsMediaStreamBubbleModel() { | 1456 ContentSettingBubbleModel::AsMediaStreamBubbleModel() { |
1458 // In general, bubble models might not inherit from the media bubble model. | 1457 // In general, bubble models might not inherit from the media bubble model. |
1459 return nullptr; | 1458 return nullptr; |
1460 } | 1459 } |
1461 | 1460 |
1462 ContentSettingSubresourceFilterBubbleModel* | 1461 ContentSettingSubresourceFilterBubbleModel* |
1463 ContentSettingBubbleModel::AsSubresourceFilterBubbleModel() { | 1462 ContentSettingBubbleModel::AsSubresourceFilterBubbleModel() { |
1464 return nullptr; | 1463 return nullptr; |
1465 } | 1464 } |
OLD | NEW |