Commit 8599dee3 authored by Sylvain Defresne's avatar Sylvain Defresne Committed by Commit Bot

Pass simple types by value not const-reference

Passing value by const-reference is unnecessary if the type
passed can fit in a register and is copyable. Change method
prototype to pass it by value.

Bug: none
Change-Id: I8fbbd25d79fcc6434ab95678bfc18292290f8694
Reviewed-on: https://chromium-review.googlesource.com/1188223Reviewed-by: default avatarDavid Roger <droger@chromium.org>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#585807}
parent 904c7827
......@@ -323,7 +323,7 @@ void AccountTrackerService::SetAccountImage(const std::string& account_id,
}
void AccountTrackerService::SetIsChildAccount(const std::string& account_id,
const bool& is_child_account) {
bool is_child_account) {
DCHECK(base::ContainsKey(accounts_, account_id));
AccountState& state = accounts_[account_id];
if (state.info.is_child_account == is_child_account)
......@@ -336,7 +336,7 @@ void AccountTrackerService::SetIsChildAccount(const std::string& account_id,
void AccountTrackerService::SetIsAdvancedProtectionAccount(
const std::string& account_id,
const bool& is_under_advanced_protection) {
bool is_under_advanced_protection) {
DCHECK(base::ContainsKey(accounts_, account_id));
AccountState& state = accounts_[account_id];
if (state.info.is_under_advanced_protection == is_under_advanced_protection)
......
......@@ -124,12 +124,11 @@ class AccountTrackerService : public KeyedService {
std::string SeedAccountInfo(AccountInfo info);
// Sets whether the account is a Unicorn account.
void SetIsChildAccount(const std::string& account_id,
const bool& is_child_account);
void SetIsChildAccount(const std::string& account_id, bool is_child_account);
// Sets whether the account is under advanced protection.
void SetIsAdvancedProtectionAccount(const std::string& account_id,
const bool& is_under_advanced_protection);
bool is_under_advanced_protection);
void RemoveAccount(const std::string& account_id);
......
......@@ -34,7 +34,7 @@ void FakeAccountFetcherService::FakeUserInfoFetchSuccess(
void FakeAccountFetcherService::FakeSetIsChildAccount(
const std::string& account_id,
const bool& is_child_account) {
bool is_child_account) {
SetIsChildAccount(account_id, is_child_account);
}
......
......@@ -34,7 +34,7 @@ class FakeAccountFetcherService : public AccountFetcherService {
const std::string& locale,
const std::string& picture_url);
void FakeSetIsChildAccount(const std::string& account_id,
const bool& is_child_account);
bool is_child_account);
FakeAccountFetcherService();
......
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