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

Side by Side Diff: components/content_settings/core/browser/content_settings_utils.cc

Issue 2476493003: Remove FundamentalValue
Patch Set: Fix 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 "components/content_settings/core/browser/content_settings_utils.h" 5 #include "components/content_settings/core/browser/content_settings_utils.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <vector> 10 #include <vector>
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 return false; 121 return false;
122 *setting = IntToContentSetting(int_value); 122 *setting = IntToContentSetting(int_value);
123 return *setting != CONTENT_SETTING_DEFAULT; 123 return *setting != CONTENT_SETTING_DEFAULT;
124 } 124 }
125 125
126 std::unique_ptr<base::Value> ContentSettingToValue(ContentSetting setting) { 126 std::unique_ptr<base::Value> ContentSettingToValue(ContentSetting setting) {
127 if (setting <= CONTENT_SETTING_DEFAULT || 127 if (setting <= CONTENT_SETTING_DEFAULT ||
128 setting >= CONTENT_SETTING_NUM_SETTINGS) { 128 setting >= CONTENT_SETTING_NUM_SETTINGS) {
129 return nullptr; 129 return nullptr;
130 } 130 }
131 return base::MakeUnique<base::FundamentalValue>(setting); 131 return base::MakeUnique<base::Value>(setting);
132 } 132 }
133 133
134 void GetRendererContentSettingRules(const HostContentSettingsMap* map, 134 void GetRendererContentSettingRules(const HostContentSettingsMap* map,
135 RendererContentSettingRules* rules) { 135 RendererContentSettingRules* rules) {
136 #if !defined(OS_ANDROID) 136 #if !defined(OS_ANDROID)
137 map->GetSettingsForOneType( 137 map->GetSettingsForOneType(
138 CONTENT_SETTINGS_TYPE_IMAGES, 138 CONTENT_SETTINGS_TYPE_IMAGES,
139 ResourceIdentifier(), 139 ResourceIdentifier(),
140 &(rules->image_rules)); 140 &(rules->image_rules));
141 #else 141 #else
(...skipping 10 matching lines...) Expand all
152 CONTENT_SETTINGS_TYPE_JAVASCRIPT, 152 CONTENT_SETTINGS_TYPE_JAVASCRIPT,
153 ResourceIdentifier(), 153 ResourceIdentifier(),
154 &(rules->script_rules)); 154 &(rules->script_rules));
155 map->GetSettingsForOneType( 155 map->GetSettingsForOneType(
156 CONTENT_SETTINGS_TYPE_AUTOPLAY, 156 CONTENT_SETTINGS_TYPE_AUTOPLAY,
157 ResourceIdentifier(), 157 ResourceIdentifier(),
158 &(rules->autoplay_rules)); 158 &(rules->autoplay_rules));
159 } 159 }
160 160
161 } // namespace content_settings 161 } // namespace content_settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698