summaryrefslogtreecommitdiffstats
path: root/components/webdata
diff options
context:
space:
mode:
authorjoi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-10 19:43:30 +0000
committerjoi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-10 19:43:30 +0000
commit56be8f58882759def1acd39f9c77c26565877f5b (patch)
tree7592528342b485300ccec8c10d69fd0d28c7162e /components/webdata
parent63807dfc506cf686f04ca0b36be6e54b125f4660 (diff)
downloadchromium_src-56be8f58882759def1acd39f9c77c26565877f5b.zip
chromium_src-56be8f58882759def1acd39f9c77c26565877f5b.tar.gz
chromium_src-56be8f58882759def1acd39f9c77c26565877f5b.tar.bz2
Switch to narrowest scope for a static, per suggestion in a review on another file.
BUG=none Review URL: https://chromiumcodereview.appspot.com/13993005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193432 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components/webdata')
-rw-r--r--components/webdata/autofill/autofill_table.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/components/webdata/autofill/autofill_table.cc b/components/webdata/autofill/autofill_table.cc
index 318458d..34dc348 100644
--- a/components/webdata/autofill/autofill_table.cc
+++ b/components/webdata/autofill/autofill_table.cc
@@ -322,9 +322,10 @@ bool RemoveAutofillProfilePieces(const std::string& guid, sql::Connection* db) {
return s3.Run();
}
-int table_key = 0;
-
WebDatabaseTable::TypeKey GetKey() {
+ // We just need a unique constant. Use the address of a static that
+ // COMDAT folding won't touch in an optimizing linker.
+ static int table_key = 0;
return reinterpret_cast<void*>(&table_key);
}