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

Unified Diff: components/webdata/autofill/autofill_table.cc

Issue 13993005: Switch to narrowest scope for a static, per suggestion in a review on another file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | « chrome/browser/webdata/web_intents_table.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/webdata/autofill/autofill_table.cc
diff --git a/components/webdata/autofill/autofill_table.cc b/components/webdata/autofill/autofill_table.cc
index 318458db258bedc873d4878cdb6fd8cdd8436989..34dc348f4fe2e1a4636213b3bb62bd46d40a99e1 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);
}
« no previous file with comments | « chrome/browser/webdata/web_intents_table.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698