fix: modernize-avoid-c-arrays (#44813)
use string_view for constants used in methods that take string_view args
This commit is contained in:
parent
024fee4e44
commit
3c941c7e8f
11 changed files with 69 additions and 62 deletions
|
@ -22,11 +22,13 @@ namespace electron {
|
|||
namespace {
|
||||
|
||||
// Double that indicates the default zoom level.
|
||||
const char kPartitionDefaultZoomLevel[] = "partition.default_zoom_level";
|
||||
constexpr std::string_view kPartitionDefaultZoomLevel =
|
||||
"partition.default_zoom_level";
|
||||
|
||||
// Dictionary that maps hostnames to zoom levels. Hosts not in this pref will
|
||||
// be displayed at the default zoom level.
|
||||
const char kPartitionPerHostZoomLevels[] = "partition.per_host_zoom_levels";
|
||||
constexpr std::string_view kPartitionPerHostZoomLevels =
|
||||
"partition.per_host_zoom_levels";
|
||||
|
||||
std::string GetHash(const base::FilePath& partition_path) {
|
||||
size_t int_key = std::hash<base::FilePath>()(partition_path);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue