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

Issue 10736042: [sql] Refactor to remove use of const_cast<>. (Closed)

Created:
8 years, 5 months ago by Scott Hess - ex-Googler
Modified:
8 years, 5 months ago
Reviewers:
Greg Billock
CC:
chromium-reviews
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

[sql] Refactor to remove use of const_cast<>. The comments in these cases used incorrect reasoning for why the const_cast<> was safe. Whether the SQL statements modify the database is irrelevant. Add an internal helper to allow them to correctly accomplish things in a const situation. BUG=none TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=148031

Patch Set 1 #

Patch Set 2 : Remove accidentally-remaining change. #

Total comments: 6

Patch Set 3 : Elaborate on GetUntrackedStatement() usage. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+34 lines, -11 lines) Patch
M sql/connection.h View 1 2 2 chunks +9 lines, -0 lines 0 comments Download
M sql/connection.cc View 1 4 chunks +25 lines, -11 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Scott Hess - ex-Googler
In reviewing code for an unrelated change, I saw these const_cast<> calls and thought "WTF?" ...
8 years, 5 months ago (2012-07-11 20:33:13 UTC) #1
Greg Billock
https://chromiumcodereview.appspot.com/10736042/diff/2001/sql/connection.cc File sql/connection.cc (right): https://chromiumcodereview.appspot.com/10736042/diff/2001/sql/connection.cc#newcode407 sql/connection.cc:407: sql.append(table_name); Is this OK to pass unescaped? (I don't ...
8 years, 5 months ago (2012-07-12 21:08:17 UTC) #2
Scott Hess - ex-Googler
https://chromiumcodereview.appspot.com/10736042/diff/2001/sql/connection.cc File sql/connection.cc (right): https://chromiumcodereview.appspot.com/10736042/diff/2001/sql/connection.cc#newcode407 sql/connection.cc:407: sql.append(table_name); On 2012/07/12 21:08:17, Greg Billock wrote: > Is ...
8 years, 5 months ago (2012-07-12 21:53:08 UTC) #3
Greg Billock
lgtm https://chromiumcodereview.appspot.com/10736042/diff/2001/sql/connection.cc File sql/connection.cc (right): https://chromiumcodereview.appspot.com/10736042/diff/2001/sql/connection.cc#newcode407 sql/connection.cc:407: sql.append(table_name); Usage is all migration stuff. I wonder ...
8 years, 5 months ago (2012-07-14 21:41:25 UTC) #4
Scott Hess - ex-Googler
https://chromiumcodereview.appspot.com/10736042/diff/2001/sql/connection.cc File sql/connection.cc (right): https://chromiumcodereview.appspot.com/10736042/diff/2001/sql/connection.cc#newcode407 sql/connection.cc:407: sql.append(table_name); On 2012/07/14 21:41:25, Greg Billock wrote: > Usage ...
8 years, 5 months ago (2012-07-24 00:19:54 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/shess@chromium.org/10736042/10001
8 years, 5 months ago (2012-07-24 00:20:04 UTC) #6
commit-bot: I haz the power
8 years, 5 months ago (2012-07-24 01:59:59 UTC) #7
Change committed as 148031

Powered by Google App Engine
This is Rietveld 408576698