Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(305)

Side by Side Diff: chrome/browser/ui/content_settings/content_setting_bubble_model.cc

Issue 2502743003: Allow getting both reading/setting cookie settings at one time (Closed)
Patch Set: rdevlin review Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/net/chrome_network_delegate.cc ('k') | components/content_settings/core/browser/cookie_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698