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

Side by Side Diff: components/password_manager/core/browser/login_database_unittest.cc

Issue 684513002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/password_manager/core/browser/login_database.h" 5 #include "components/password_manager/core/browser/login_database.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/files/scoped_temp_dir.h" 9 #include "base/files/scoped_temp_dir.h"
10 #include "base/memory/scoped_vector.h" 10 #include "base/memory/scoped_vector.h"
(...skipping 24 matching lines...) Expand all
35 } 35 }
36 36
37 } // namespace 37 } // namespace
38 38
39 // Serialization routines for vectors implemented in login_database.cc. 39 // Serialization routines for vectors implemented in login_database.cc.
40 Pickle SerializeVector(const std::vector<base::string16>& vec); 40 Pickle SerializeVector(const std::vector<base::string16>& vec);
41 std::vector<base::string16> DeserializeVector(const Pickle& pickle); 41 std::vector<base::string16> DeserializeVector(const Pickle& pickle);
42 42
43 class LoginDatabaseTest : public testing::Test { 43 class LoginDatabaseTest : public testing::Test {
44 protected: 44 protected:
45 virtual void SetUp() { 45 void SetUp() override {
46 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 46 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
47 file_ = temp_dir_.path().AppendASCII("TestMetadataStoreMacDatabase"); 47 file_ = temp_dir_.path().AppendASCII("TestMetadataStoreMacDatabase");
48 48
49 ASSERT_TRUE(db_.Init(file_)); 49 ASSERT_TRUE(db_.Init(file_));
50 } 50 }
51 51
52 void FormsAreEqual(const PasswordForm& expected, const PasswordForm& actual) { 52 void FormsAreEqual(const PasswordForm& expected, const PasswordForm& actual) {
53 PasswordForm expected_copy(expected); 53 PasswordForm expected_copy(expected);
54 #if defined(OS_MACOSX) && !defined(OS_IOS) 54 #if defined(OS_MACOSX) && !defined(OS_IOS)
55 // On the Mac we should never be storing passwords in the database. 55 // On the Mac we should never be storing passwords in the database.
(...skipping 901 matching lines...) Expand 10 before | Expand all | Expand 10 after
957 // This tests that sql::Connection::set_restrict_to_user() was called, 957 // This tests that sql::Connection::set_restrict_to_user() was called,
958 // and that function is a noop on non-POSIX platforms in any case. 958 // and that function is a noop on non-POSIX platforms in any case.
959 TEST_F(LoginDatabaseTest, FilePermissions) { 959 TEST_F(LoginDatabaseTest, FilePermissions) {
960 int mode = base::FILE_PERMISSION_MASK; 960 int mode = base::FILE_PERMISSION_MASK;
961 EXPECT_TRUE(base::GetPosixFilePermissions(file_, &mode)); 961 EXPECT_TRUE(base::GetPosixFilePermissions(file_, &mode));
962 EXPECT_EQ((mode & base::FILE_PERMISSION_USER_MASK), mode); 962 EXPECT_EQ((mode & base::FILE_PERMISSION_USER_MASK), mode);
963 } 963 }
964 #endif // defined(OS_POSIX) 964 #endif // defined(OS_POSIX)
965 965
966 } // namespace password_manager 966 } // namespace password_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698