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

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

Issue 794683005: replace COMPILE_ASSERT with static_assert in components/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: formatting fixup Created 6 years 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 <utility> 7 #include <utility>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 #endif 55 #endif
56 56
57 content_settings::SettingSource kProviderSourceMap[] = { 57 content_settings::SettingSource kProviderSourceMap[] = {
58 content_settings::SETTING_SOURCE_EXTENSION, 58 content_settings::SETTING_SOURCE_EXTENSION,
59 content_settings::SETTING_SOURCE_POLICY, 59 content_settings::SETTING_SOURCE_POLICY,
60 content_settings::SETTING_SOURCE_EXTENSION, 60 content_settings::SETTING_SOURCE_EXTENSION,
61 content_settings::SETTING_SOURCE_USER, 61 content_settings::SETTING_SOURCE_USER,
62 content_settings::SETTING_SOURCE_USER, 62 content_settings::SETTING_SOURCE_USER,
63 content_settings::SETTING_SOURCE_USER, 63 content_settings::SETTING_SOURCE_USER,
64 }; 64 };
65 COMPILE_ASSERT(arraysize(kProviderSourceMap) == 65 static_assert(arraysize(kProviderSourceMap) ==
66 HostContentSettingsMap::NUM_PROVIDER_TYPES, 66 HostContentSettingsMap::NUM_PROVIDER_TYPES,
67 kProviderSourceMap_has_incorrect_size); 67 "kProviderSourceMap should have NUM_PROVIDER_TYPES elements");
68 68
69 // Returns true if the |content_type| supports a resource identifier. 69 // Returns true if the |content_type| supports a resource identifier.
70 // Resource identifiers are supported (but not required) for plug-ins. 70 // Resource identifiers are supported (but not required) for plug-ins.
71 bool SupportsResourceIdentifier(ContentSettingsType content_type) { 71 bool SupportsResourceIdentifier(ContentSettingsType content_type) {
72 return content_type == CONTENT_SETTINGS_TYPE_PLUGINS; 72 return content_type == CONTENT_SETTINGS_TYPE_PLUGINS;
73 } 73 }
74 74
75 } // namespace 75 } // namespace
76 76
77 HostContentSettingsMap::HostContentSettingsMap(PrefService* prefs, 77 HostContentSettingsMap::HostContentSettingsMap(PrefService* prefs,
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 } 746 }
747 } 747 }
748 748
749 if (info) { 749 if (info) {
750 info->source = content_settings::SETTING_SOURCE_NONE; 750 info->source = content_settings::SETTING_SOURCE_NONE;
751 info->primary_pattern = ContentSettingsPattern(); 751 info->primary_pattern = ContentSettingsPattern();
752 info->secondary_pattern = ContentSettingsPattern(); 752 info->secondary_pattern = ContentSettingsPattern();
753 } 753 }
754 return scoped_ptr<base::Value>(); 754 return scoped_ptr<base::Value>();
755 } 755 }
OLDNEW
« no previous file with comments | « components/content_settings/core/browser/content_settings_utils.cc ('k') | components/crash/app/breakpad_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698