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

Unified Diff: sql/connection.cc

Issue 12767006: [Cleanup] Remove StringPrintf from global namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase, once more Created 7 years, 9 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
Index: sql/connection.cc
diff --git a/sql/connection.cc b/sql/connection.cc
index 0fda72e8596ad8a1acced731e49b8686aea50f88..5f6b5906e0c136e77618bd8eb4ed8ce9bf1855df 100644
--- a/sql/connection.cc
+++ b/sql/connection.cc
@@ -240,7 +240,8 @@ bool Connection::Raze() {
<< " page_size_ " << page_size_ << " is not a power of two.";
const int kSqliteMaxPageSize = 32768; // from sqliteLimit.h
DCHECK_LE(page_size_, kSqliteMaxPageSize);
- const std::string sql = StringPrintf("PRAGMA page_size=%d", page_size_);
+ const std::string sql =
+ base::StringPrintf("PRAGMA page_size=%d", page_size_);
if (!null_db.Execute(sql.c_str()))
return false;
}
@@ -666,13 +667,15 @@ bool Connection::OpenInternal(const std::string& file_name) {
<< " page_size_ " << page_size_ << " is not a power of two.";
const int kSqliteMaxPageSize = 32768; // from sqliteLimit.h
DCHECK_LE(page_size_, kSqliteMaxPageSize);
- const std::string sql = StringPrintf("PRAGMA page_size=%d", page_size_);
+ const std::string sql =
+ base::StringPrintf("PRAGMA page_size=%d", page_size_);
if (!ExecuteWithTimeout(sql.c_str(), kBusyTimeout))
DLOG(FATAL) << "Could not set page size: " << GetErrorMessage();
}
if (cache_size_ != 0) {
- const std::string sql = StringPrintf("PRAGMA cache_size=%d", cache_size_);
+ const std::string sql =
+ base::StringPrintf("PRAGMA cache_size=%d", cache_size_);
if (!ExecuteWithTimeout(sql.c_str(), kBusyTimeout))
DLOG(FATAL) << "Could not set cache size: " << GetErrorMessage();
}

Powered by Google App Engine
This is Rietveld 408576698