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

Unified Diff: sql/connection.h

Issue 5125579611308032: [sql] Allow restricting database to user read access. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments about posix-specificness. Created 7 years, 5 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/password_manager/login_database_unittest.cc ('k') | sql/connection.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sql/connection.h
diff --git a/sql/connection.h b/sql/connection.h
index 8155a8fd72d1892b1fcc4cab27075ff2f6efb456..90d3251bbb517751821bae01b9308c66d34b6c6d 100644
--- a/sql/connection.h
+++ b/sql/connection.h
@@ -116,6 +116,12 @@ class SQL_EXPORT Connection {
// This must be called before Open() to have an effect.
void set_exclusive_locking() { exclusive_locking_ = true; }
+ // Call to cause Open() to restrict access permissions of the
+ // database file to only the owner.
+ // TODO(shess): Currently only supported on OS_POSIX, is a noop on
+ // other platforms.
+ void set_restrict_to_user() { restrict_to_user_ = true; }
+
// Set an error-handling callback. On errors, the error number (and
// statement, if available) will be passed to the callback.
//
@@ -481,6 +487,7 @@ class SQL_EXPORT Connection {
int page_size_;
int cache_size_;
bool exclusive_locking_;
+ bool restrict_to_user_;
// All cached statements. Keeping a reference to these statements means that
// they'll remain active.
« no previous file with comments | « chrome/browser/password_manager/login_database_unittest.cc ('k') | sql/connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698