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

Unified Diff: components/component_updater/component_updater_service.cc

Issue 2110663002: components: Change auto to not deduce raw pointers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase+one fix Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/certificate_transparency/log_dns_client.cc ('k') | components/cronet/ios/Cronet.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/component_updater/component_updater_service.cc
diff --git a/components/component_updater/component_updater_service.cc b/components/component_updater/component_updater_service.cc
index 5ef5a3f54d1f7dc66eb8d3f45b3bd96fbde5c8ff..ab4ad19a24074eb33c711eeaa958a8fb4927f8cf 100644
--- a/components/component_updater/component_updater_service.cc
+++ b/components/component_updater/component_updater_service.cc
@@ -234,7 +234,7 @@ bool CrxUpdateService::OnDemandUpdateWithCooldown(const std::string& id) {
DCHECK(GetComponent(id));
// Check if the request is too soon.
- const auto component_state(GetComponentState(id));
+ const auto* component_state(GetComponentState(id));
if (component_state) {
base::TimeDelta delta = base::Time::Now() - component_state->last_check;
if (delta < base::TimeDelta::FromSeconds(config_->OnDemandDelay()))
@@ -269,7 +269,7 @@ bool CrxUpdateService::CheckForUpdates() {
for (const auto id : components_order_) {
DCHECK(components_.find(id) != components_.end());
- auto component(GetComponent(id));
+ auto* component(GetComponent(id));
if (!component || component->requires_network_encryption)
secure_ids.push_back(id);
else
@@ -327,7 +327,7 @@ void CrxUpdateService::OnUpdate(const std::vector<std::string>& ids,
DCHECK(components->empty());
for (const auto& id : ids) {
- const auto registered_component(GetComponent(id));
+ const auto* registered_component(GetComponent(id));
if (registered_component) {
components->push_back(*registered_component);
}
@@ -345,7 +345,7 @@ void CrxUpdateService::OnUpdateComplete(const base::TimeTicks& start_time,
for (const auto id : components_pending_unregistration_) {
if (!update_client_->IsUpdating(id)) {
- const auto component = GetComponent(id);
+ const auto* component = GetComponent(id);
if (component)
DoUnregisterComponent(*component);
}
@@ -376,7 +376,7 @@ void CrxUpdateService::OnEvent(Events event, const std::string& id) {
// Update the component registration with the new version.
if (event == Observer::Events::COMPONENT_UPDATED) {
- auto component(const_cast<CrxComponent*>(GetComponent(id)));
+ auto* component(const_cast<CrxComponent*>(GetComponent(id)));
if (component) {
component->version = update_item.next_version;
component->fingerprint = update_item.next_fp;
« no previous file with comments | « components/certificate_transparency/log_dns_client.cc ('k') | components/cronet/ios/Cronet.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698