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

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

Issue 1076153002: Coverting std::String() to ResourceIdentifier() in content_settings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months 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
« no previous file with comments | « components/content_settings/core/browser/content_settings_pref_provider.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 case CONTENT_SETTING_SESSION_ONLY: 84 case CONTENT_SETTING_SESSION_ONLY:
85 return "session"; 85 return "session";
86 case CONTENT_SETTING_DETECT_IMPORTANT_CONTENT: 86 case CONTENT_SETTING_DETECT_IMPORTANT_CONTENT:
87 return "detect"; 87 return "detect";
88 case CONTENT_SETTING_DEFAULT: 88 case CONTENT_SETTING_DEFAULT:
89 return "default"; 89 return "default";
90 case CONTENT_SETTING_NUM_SETTINGS: 90 case CONTENT_SETTING_NUM_SETTINGS:
91 NOTREACHED(); 91 NOTREACHED();
92 } 92 }
93 93
94 return std::string(); 94 return ResourceIdentifier();
95 } 95 }
96 96
97 ContentSetting ContentSettingFromString(const std::string& name) { 97 ContentSetting ContentSettingFromString(const std::string& name) {
98 if (name == "allow") 98 if (name == "allow")
99 return CONTENT_SETTING_ALLOW; 99 return CONTENT_SETTING_ALLOW;
100 if (name == "ask") 100 if (name == "ask")
101 return CONTENT_SETTING_ASK; 101 return CONTENT_SETTING_ASK;
102 if (name == "block") 102 if (name == "block")
103 return CONTENT_SETTING_BLOCK; 103 return CONTENT_SETTING_BLOCK;
104 if (name == "session") 104 if (name == "session")
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 *secondary_pattern = rule.secondary_pattern; 222 *secondary_pattern = rule.secondary_pattern;
223 return rule.value.get()->DeepCopy(); 223 return rule.value.get()->DeepCopy();
224 } 224 }
225 } 225 }
226 return NULL; 226 return NULL;
227 } 227 }
228 228
229 void GetRendererContentSettingRules(const HostContentSettingsMap* map, 229 void GetRendererContentSettingRules(const HostContentSettingsMap* map,
230 RendererContentSettingRules* rules) { 230 RendererContentSettingRules* rules) {
231 map->GetSettingsForOneType( 231 map->GetSettingsForOneType(
232 CONTENT_SETTINGS_TYPE_IMAGES, std::string(), &(rules->image_rules)); 232 CONTENT_SETTINGS_TYPE_IMAGES,
233 ResourceIdentifier(),
234 &(rules->image_rules));
233 map->GetSettingsForOneType( 235 map->GetSettingsForOneType(
234 CONTENT_SETTINGS_TYPE_JAVASCRIPT, std::string(), &(rules->script_rules)); 236 CONTENT_SETTINGS_TYPE_JAVASCRIPT,
237 ResourceIdentifier(),
238 &(rules->script_rules));
235 } 239 }
236 240
237 } // namespace content_settings 241 } // namespace content_settings
OLDNEW
« no previous file with comments | « components/content_settings/core/browser/content_settings_pref_provider.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698