diff --git a/components/brave_shields/core/browser/ad_block_filters_provider_manager.cc b/components/brave_shields/core/browser/ad_block_filters_provider_manager.cc index 0344b6bbba2..eb6a8713d15 100644 --- a/components/brave_shields/core/browser/ad_block_filters_provider_manager.cc +++ b/components/brave_shields/core/browser/ad_block_filters_provider_manager.cc @@ -80,7 +80,7 @@ void AdBlockFiltersProviderManager::LoadFilterSetForEngine( auto& filters_providers = is_for_default_engine ? default_engine_filters_providers_ : additional_engine_filters_providers_; - const auto collect_and_merge = base::BarrierCallback< + auto collect_and_merge = base::BarrierCallback< base::OnceCallback*)>>( filters_providers.size(), base::BindOnce(&AdBlockFiltersProviderManager::FinishCombinating, @@ -89,7 +89,7 @@ void AdBlockFiltersProviderManager::LoadFilterSetForEngine( task_tracker_.PostTask( base::SequencedTaskRunner::GetCurrentDefault().get(), FROM_HERE, base::BindOnce(&AdBlockFiltersProvider::LoadFilterSet, - provider->AsWeakPtr(), std::move(collect_and_merge))); + provider->AsWeakPtr(), collect_and_merge)); } } diff --git a/components/debounce/core/browser/debounce_rule.cc b/components/debounce/core/browser/debounce_rule.cc index 82a41ccae30..bac67a41252 100644 --- a/components/debounce/core/browser/debounce_rule.cc +++ b/components/debounce/core/browser/debounce_rule.cc @@ -201,8 +201,7 @@ DebounceRule::ParseRules(const std::string& contents) { } for (const URLPattern& pattern : rule->include_pattern_set()) { if (!pattern.host().empty()) { - const std::string etldp1 = - DebounceRule::GetETLDForDebounce(pattern.host()); + std::string etldp1 = DebounceRule::GetETLDForDebounce(pattern.host()); if (!etldp1.empty()) { hosts.insert(std::move(etldp1)); } diff --git a/components/https_upgrade_exceptions/browser/https_upgrade_exceptions_service.cc b/components/https_upgrade_exceptions/browser/https_upgrade_exceptions_service.cc index 436768c8724..9e448dd8725 100644 --- a/components/https_upgrade_exceptions/browser/https_upgrade_exceptions_service.cc +++ b/components/https_upgrade_exceptions/browser/https_upgrade_exceptions_service.cc @@ -51,7 +51,7 @@ void HttpsUpgradeExceptionsService::OnDATFileDataReady( } std::vector lines = base::SplitString( contents, "\n", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY); - for (const auto& line : lines) { + for (auto&& line : lines) { exceptional_domains_.insert(std::move(line)); } is_ready_ = true; diff --git a/components/localhost_permission/localhost_permission_component.cc b/components/localhost_permission/localhost_permission_component.cc index f1c42a9c9e4..d0958b60c38 100644 --- a/components/localhost_permission/localhost_permission_component.cc +++ b/components/localhost_permission/localhost_permission_component.cc @@ -72,7 +72,7 @@ void LocalhostPermissionComponent::OnDATFileDataReady( continue; } // Construct a GURL from the line, and store the eTLD+1. - const auto url = GURL("https://" + std::move(line)); + const auto url = GURL("https://" + line); if (url.is_valid()) { allowed_domains_.insert(GetDomain(url)); } diff --git a/components/p3a/p3a_config.cc b/components/p3a/p3a_config.cc index 9b2af44017f..79e4b5182ca 100644 --- a/components/p3a/p3a_config.cc +++ b/components/p3a/p3a_config.cc @@ -133,7 +133,7 @@ P3AConfig P3AConfig::LoadFromCommandLine() { config.average_upload_interval = MaybeOverrideTimeDeltaFromCommandLine( cmdline, switches::kP3AUploadIntervalSeconds, - std::move(config.average_upload_interval)); + config.average_upload_interval); config.randomize_upload_interval = !cmdline->HasSwitch(switches::kP3ADoNotRandomizeUploadInterval); @@ -141,15 +141,15 @@ P3AConfig P3AConfig::LoadFromCommandLine() { config.json_rotation_intervals[MetricLogType::kSlow] = MaybeOverrideTimeDeltaFromCommandLine( cmdline, switches::kP3ASlowRotationIntervalSeconds, - std::move(config.json_rotation_intervals[MetricLogType::kSlow])); + config.json_rotation_intervals[MetricLogType::kSlow]); config.json_rotation_intervals[MetricLogType::kTypical] = MaybeOverrideTimeDeltaFromCommandLine( cmdline, switches::kP3ATypicalRotationIntervalSeconds, - std::move(config.json_rotation_intervals[MetricLogType::kTypical])); + config.json_rotation_intervals[MetricLogType::kTypical]); config.json_rotation_intervals[MetricLogType::kExpress] = MaybeOverrideTimeDeltaFromCommandLine( cmdline, switches::kP3AExpressRotationIntervalSeconds, - std::move(config.json_rotation_intervals[MetricLogType::kExpress])); + config.json_rotation_intervals[MetricLogType::kExpress]); config.fake_star_epochs[MetricLogType::kSlow] = MaybeSetUint8FromCommandLine(cmdline, switches::kP3AFakeSlowStarEpoch); diff --git a/components/permissions/permission_lifetime_options.cc b/components/permissions/permission_lifetime_options.cc index 61af0366dac..99c9df8fb0d 100644 --- a/components/permissions/permission_lifetime_options.cc +++ b/components/permissions/permission_lifetime_options.cc @@ -13,7 +13,7 @@ namespace permissions { PermissionLifetimeOption::PermissionLifetimeOption( std::u16string label, std::optional lifetime) - : label(std::move(label)), lifetime(std::move(lifetime)) {} + : label(std::move(label)), lifetime(lifetime) {} PermissionLifetimeOption::PermissionLifetimeOption( const PermissionLifetimeOption&) = default; diff --git a/components/request_otr/browser/request_otr_rule.cc b/components/request_otr/browser/request_otr_rule.cc index 1cda5f25047..5cae18e3655 100644 --- a/components/request_otr/browser/request_otr_rule.cc +++ b/components/request_otr/browser/request_otr_rule.cc @@ -106,7 +106,7 @@ RequestOTRRule::ParseRules(const std::string& contents) { } for (const URLPattern& pattern : rule->include_pattern_set()) { if (!pattern.host().empty()) { - const std::string etldp1 = + std::string etldp1 = RequestOTRRule::GetETLDForRequestOTR(pattern.host()); if (!etldp1.empty()) { hosts.insert(std::move(etldp1)); diff --git a/components/tor/tor_file_watcher.cc b/components/tor/tor_file_watcher.cc index 6dac1822bbb..b6e586bf156 100644 --- a/components/tor/tor_file_watcher.cc +++ b/components/tor/tor_file_watcher.cc @@ -43,7 +43,7 @@ constexpr char kControlAuthCookieName[] = "control_auth_cookie"; constexpr char kControlPortName[] = "controlport"; } // namespace -TorFileWatcher::TorFileWatcher(const base::FilePath& watch_dir_path) +TorFileWatcher::TorFileWatcher(base::FilePath watch_dir_path) : polling_(false), repoll_(false), watch_dir_path_(std::move(watch_dir_path)), diff --git a/components/tor/tor_file_watcher.h b/components/tor/tor_file_watcher.h index 2135efd501a..4ff7ef069e1 100644 --- a/components/tor/tor_file_watcher.h +++ b/components/tor/tor_file_watcher.h @@ -35,7 +35,7 @@ class TorFileWatcher { using WatchCallback = base::OnceCallback< void(bool success, std::vector cookie, int port)>; - explicit TorFileWatcher(const base::FilePath& watch_dir_path); + explicit TorFileWatcher(base::FilePath watch_dir_path); ~TorFileWatcher();