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

Unified Diff: chrome/browser/password_manager/login_database_unittest.cc

Issue 5125579611308032: [sql] Allow restricting database to user read access. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: umask scoper isn't necessary for Windows anyhow. 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
Index: chrome/browser/password_manager/login_database_unittest.cc
diff --git a/chrome/browser/password_manager/login_database_unittest.cc b/chrome/browser/password_manager/login_database_unittest.cc
index a0383da2866455d363e2326bf5e8b631a4c14c1b..92a1123dd775e52ada0f3be2948c9d6b97716e87 100644
--- a/chrome/browser/password_manager/login_database_unittest.cc
+++ b/chrome/browser/password_manager/login_database_unittest.cc
@@ -5,6 +5,7 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "base/basictypes.h"
+#include "base/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/path_service.h"
#include "base/strings/string_number_conversions.h"
@@ -567,3 +568,12 @@ TEST_F(LoginDatabaseTest, VectorSerialization) {
output = DeserializeVector(temp);
EXPECT_THAT(output, Eq(vec));
}
+
+#if defined(OS_POSIX)
Ilya Sherman 2013/07/16 22:35:52 nit: Mebbe add a comment for why this is restricte
Scott Hess - ex-Googler 2013/07/17 00:25:37 Done. Comment is also kind posix-specific :-).
+// Only the current user has permission to read the database.
+TEST_F(LoginDatabaseTest, FilePermissions) {
+ int mode = file_util::FILE_PERMISSION_MASK;
+ EXPECT_TRUE(file_util::GetPosixFilePermissions(file_, &mode));
+ EXPECT_EQ((mode & file_util::FILE_PERMISSION_USER_MASK), mode);
+}
+#endif // defined(OS_POSIX)

Powered by Google App Engine
This is Rietveld 408576698