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

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

Issue 2779893005: Continue to clean c_str() calls. (Closed)
Patch Set: Revert changes in font_service_app.cc Created 3 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
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/host_content_settings_map.h" 5 #include "components/content_settings/core/browser/host_content_settings_map.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 // TODO(raymes): Move this into GetContentSetting. This has nothing to do with 787 // TODO(raymes): Move this into GetContentSetting. This has nothing to do with
788 // website settings 788 // website settings
789 const content_settings::ContentSettingsInfo* content_settings_info = 789 const content_settings::ContentSettingsInfo* content_settings_info =
790 content_settings::ContentSettingsRegistry::GetInstance()->Get( 790 content_settings::ContentSettingsRegistry::GetInstance()->Get(
791 content_type); 791 content_type);
792 if (content_settings_info) { 792 if (content_settings_info) {
793 for (const std::string& scheme : 793 for (const std::string& scheme :
794 content_settings_info->whitelisted_schemes()) { 794 content_settings_info->whitelisted_schemes()) {
795 DCHECK(SchemeCanBeWhitelisted(scheme)); 795 DCHECK(SchemeCanBeWhitelisted(scheme));
796 796
797 if (primary_url.SchemeIs(scheme.c_str())) { 797 if (primary_url.SchemeIs(scheme)) {
798 if (info) { 798 if (info) {
799 info->source = content_settings::SETTING_SOURCE_WHITELIST; 799 info->source = content_settings::SETTING_SOURCE_WHITELIST;
800 info->primary_pattern = ContentSettingsPattern::Wildcard(); 800 info->primary_pattern = ContentSettingsPattern::Wildcard();
801 info->secondary_pattern = ContentSettingsPattern::Wildcard(); 801 info->secondary_pattern = ContentSettingsPattern::Wildcard();
802 } 802 }
803 return std::unique_ptr<base::Value>( 803 return std::unique_ptr<base::Value>(
804 new base::Value(CONTENT_SETTING_ALLOW)); 804 new base::Value(CONTENT_SETTING_ALLOW));
805 } 805 }
806 } 806 }
807 } 807 }
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
914 if (primary_pattern) 914 if (primary_pattern)
915 *primary_pattern = rule.primary_pattern; 915 *primary_pattern = rule.primary_pattern;
916 if (secondary_pattern) 916 if (secondary_pattern)
917 *secondary_pattern = rule.secondary_pattern; 917 *secondary_pattern = rule.secondary_pattern;
918 return base::WrapUnique(rule.value.get()->DeepCopy()); 918 return base::WrapUnique(rule.value.get()->DeepCopy());
919 } 919 }
920 } 920 }
921 } 921 }
922 return std::unique_ptr<base::Value>(); 922 return std::unique_ptr<base::Value>();
923 } 923 }
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/element_util.cc ('k') | components/dom_distiller/content/browser/dom_distiller_viewer_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698