Commit 6c753cec authored by Daniel Bratell's avatar Daniel Bratell Committed by Commit Bot

Give autofill's LegacyStrikeDatabas constants legacy names

In some (non default) jumbo configurations, strike.cc and
legacy_strike_database.cc compile in the same translation
unit and then some constants clash. Assuming
LegacyStrikeDatabase will soon go away, just give its
constants a bit longer names.

Bug: 884817
Change-Id: I1dc6d8b6499d3c6195a56423236198a02c32f3f0
Reviewed-on: https://chromium-review.googlesource.com/c/1348471
Commit-Queue: Sebastien Seguin-Gagnon <sebsg@chromium.org>
Reviewed-by: default avatarSebastien Seguin-Gagnon <sebsg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#610594}
parent c766f9ba
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
namespace autofill { namespace autofill {
namespace { namespace {
const char kDatabaseClientName[] = "StrikeService"; const char kLegacyDatabaseClientName[] = "StrikeService";
const char kKeyDeliminator[] = "__"; const char kLegacyDatabaseKeyDeliminator[] = "__";
const char kKeyPrefixForCreditCardSave[] = "creditCardSave"; const char kKeyPrefixForCreditCardSave[] = "creditCardSave";
} // namespace } // namespace
...@@ -28,7 +28,7 @@ LegacyStrikeDatabase::LegacyStrikeDatabase(const base::FilePath& database_dir) ...@@ -28,7 +28,7 @@ LegacyStrikeDatabase::LegacyStrikeDatabase(const base::FilePath& database_dir)
{base::MayBlock(), base::TaskPriority::BEST_EFFORT, {base::MayBlock(), base::TaskPriority::BEST_EFFORT,
base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN}))), base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN}))),
weak_ptr_factory_(this) { weak_ptr_factory_(this) {
db_->Init(kDatabaseClientName, database_dir, db_->Init(kLegacyDatabaseClientName, database_dir,
leveldb_proto::CreateSimpleOptions(), leveldb_proto::CreateSimpleOptions(),
base::BindRepeating(&LegacyStrikeDatabase::OnDatabaseInit, base::BindRepeating(&LegacyStrikeDatabase::OnDatabaseInit,
weak_ptr_factory_.GetWeakPtr())); weak_ptr_factory_.GetWeakPtr()));
...@@ -165,7 +165,7 @@ void LegacyStrikeDatabase::LoadKeys(const LoadKeysCallback& callback) { ...@@ -165,7 +165,7 @@ void LegacyStrikeDatabase::LoadKeys(const LoadKeysCallback& callback) {
std::string LegacyStrikeDatabase::CreateKey( std::string LegacyStrikeDatabase::CreateKey(
const std::string& type_prefix, const std::string& type_prefix,
const std::string& identifier_suffix) { const std::string& identifier_suffix) {
return type_prefix + kKeyDeliminator + identifier_suffix; return type_prefix + kLegacyDatabaseKeyDeliminator + identifier_suffix;
} }
std::string LegacyStrikeDatabase::GetKeyPrefixForCreditCardSave() { std::string LegacyStrikeDatabase::GetKeyPrefixForCreditCardSave() {
...@@ -173,7 +173,7 @@ std::string LegacyStrikeDatabase::GetKeyPrefixForCreditCardSave() { ...@@ -173,7 +173,7 @@ std::string LegacyStrikeDatabase::GetKeyPrefixForCreditCardSave() {
} }
std::string LegacyStrikeDatabase::GetPrefixFromKey(const std::string& key) { std::string LegacyStrikeDatabase::GetPrefixFromKey(const std::string& key) {
return key.substr(0, key.find(kKeyDeliminator)); return key.substr(0, key.find(kLegacyDatabaseKeyDeliminator));
} }
} // namespace autofill } // namespace autofill
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