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

Unified Diff: chrome/browser/webdata/keyword_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 | « no previous file | chrome/browser/webdata/logins_table.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/webdata/keyword_table.cc
diff --git a/chrome/browser/webdata/keyword_table.cc b/chrome/browser/webdata/keyword_table.cc
index 10d224e8d7431a86be693729c262ac14451095bc..6327c0eac1e86f058c44bd3b3cccf0fc57e27197 100644
--- a/chrome/browser/webdata/keyword_table.cc
+++ b/chrome/browser/webdata/keyword_table.cc
@@ -116,9 +116,10 @@ void BindURLToStatement(const TemplateURLData& data,
s->BindString(starting_column + 17, data.search_terms_replacement_key);
}
-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 | « no previous file | chrome/browser/webdata/logins_table.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698