Commit 84286d65 authored by Zinovy Nis's avatar Zinovy Nis Committed by Commit Bot

[clang-tidy] Use-after-move in session_store.cc fixed

And few minor things

Bug: <none>
Change-Id: Ib5ecffb725bfe5843acd3c46f34956a763b91876
Reviewed-on: https://chromium-review.googlesource.com/c/1329676
Commit-Queue: Mikel Astiz <mastiz@chromium.org>
Reviewed-by: default avatarJan Krcal <jkrcal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608301}
parent bb3ab7dd
...@@ -115,7 +115,7 @@ class FactoryImpl : public base::SupportsWeakPtr<FactoryImpl> { ...@@ -115,7 +115,7 @@ class FactoryImpl : public base::SupportsWeakPtr<FactoryImpl> {
void Create(const syncer::DeviceInfo& device_info, void Create(const syncer::DeviceInfo& device_info,
SessionStore::FactoryCompletionCallback callback) { SessionStore::FactoryCompletionCallback callback) {
const std::string cache_guid = device_info.guid(); const std::string& cache_guid = device_info.guid();
DCHECK(!cache_guid.empty()); DCHECK(!cache_guid.empty());
SessionStore::SessionInfo session_info; SessionStore::SessionInfo session_info;
...@@ -161,7 +161,8 @@ class FactoryImpl : public base::SupportsWeakPtr<FactoryImpl> { ...@@ -161,7 +161,8 @@ class FactoryImpl : public base::SupportsWeakPtr<FactoryImpl> {
return; return;
} }
store->ReadAllMetadata(base::BindOnce( ModelTypeStore* store_raw = store.get();
store_raw->ReadAllMetadata(base::BindOnce(
&FactoryImpl::OnReadAllMetadata, base::AsWeakPtr(this), session_info, &FactoryImpl::OnReadAllMetadata, base::AsWeakPtr(this), session_info,
std::move(callback), std::move(store), std::move(record_list))); std::move(callback), std::move(store), std::move(record_list)));
} }
...@@ -455,7 +456,7 @@ SessionStore::SessionStore( ...@@ -455,7 +456,7 @@ SessionStore::SessionStore(
} }
} }
SessionStore::~SessionStore() {} SessionStore::~SessionStore() = default;
std::unique_ptr<syncer::DataBatch> SessionStore::GetSessionDataForKeys( std::unique_ptr<syncer::DataBatch> SessionStore::GetSessionDataForKeys(
const std::vector<std::string>& storage_keys) const { const std::vector<std::string>& storage_keys) const {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment