diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-27 05:06:32 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-27 05:06:32 +0000 |
commit | 9c6d4ea8b0db32fe8e55e0aedebf0d5e198621d4 (patch) | |
tree | 492b83bafd617c4202db490ade7f350fc28c2ac6 | |
parent | 99dae71126809f0945b060664a962dd8e1369cfb (diff) | |
download | chromium_src-9c6d4ea8b0db32fe8e55e0aedebf0d5e198621d4.zip chromium_src-9c6d4ea8b0db32fe8e55e0aedebf0d5e198621d4.tar.gz chromium_src-9c6d4ea8b0db32fe8e55e0aedebf0d5e198621d4.tar.bz2 |
Cleanup bits of cruft from parallel_authenticator.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/10201011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134230 0039d316-1c4b-4281-b951-d872f2087c98
3 files changed, 9 insertions, 21 deletions
diff --git a/chrome/browser/chromeos/login/parallel_authenticator.cc b/chrome/browser/chromeos/login/parallel_authenticator.cc index a89be45..7ba5ed8 100644 --- a/chrome/browser/chromeos/login/parallel_authenticator.cc +++ b/chrome/browser/chromeos/login/parallel_authenticator.cc @@ -9,7 +9,6 @@ #include "base/file_path.h" #include "base/file_util.h" #include "base/logging.h" -#include "base/path_service.h" #include "base/string_util.h" #include "chrome/browser/chromeos/boot_times_loader.h" #include "chrome/browser/chromeos/cros/cros_library.h" @@ -21,7 +20,6 @@ #include "chrome/browser/chromeos/login/ownership_service.h" #include "chrome/browser/chromeos/login/user_manager.h" #include "chrome/common/chrome_notification_types.h" -#include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_switches.h" #include "chromeos/dbus/cryptohome_client.h" #include "chromeos/dbus/dbus_thread_manager.h" @@ -30,7 +28,6 @@ #include "third_party/cros_system_api/dbus/service_constants.h" using content::BrowserThread; -using file_util::ReadFileToString; namespace chromeos { diff --git a/chrome/browser/chromeos/login/parallel_authenticator.h b/chrome/browser/chromeos/login/parallel_authenticator.h index 0733663..465fa23 100644 --- a/chrome/browser/chromeos/login/parallel_authenticator.h +++ b/chrome/browser/chromeos/login/parallel_authenticator.h @@ -16,8 +16,8 @@ #include "chrome/browser/chromeos/login/authenticator.h" #include "chrome/browser/chromeos/login/auth_attempt_state.h" #include "chrome/browser/chromeos/login/auth_attempt_state_resolver.h" -#include "chrome/browser/chromeos/login/test_attempt_state.h" #include "chrome/browser/chromeos/login/online_attempt.h" +#include "chrome/browser/chromeos/login/test_attempt_state.h" #include "chrome/common/net/gaia/gaia_auth_consumer.h" class LoginFailure; @@ -147,6 +147,11 @@ class ParallelAuthenticator : public Authenticator, private: friend class ParallelAuthenticatorTest; + FRIEND_TEST_ALL_PREFIXES(ParallelAuthenticatorTest, + ResolveOwnerNeededDirectFailedMount); + FRIEND_TEST_ALL_PREFIXES(ParallelAuthenticatorTest, ResolveOwnerNeededMount); + FRIEND_TEST_ALL_PREFIXES(ParallelAuthenticatorTest, + ResolveOwnerNeededFailedMount); // Returns the AuthState we're in, given the status info we have at // the time of call. @@ -252,11 +257,6 @@ class ParallelAuthenticator : public Authenticator, // True if we use OAuth-based authentication flow. bool using_oauth_; - FRIEND_TEST_ALL_PREFIXES(ParallelAuthenticatorTest, - ResolveOwnerNeededDirectFailedMount); - FRIEND_TEST_ALL_PREFIXES(ParallelAuthenticatorTest, ResolveOwnerNeededMount); - FRIEND_TEST_ALL_PREFIXES(ParallelAuthenticatorTest, - ResolveOwnerNeededFailedMount); DISALLOW_COPY_AND_ASSIGN(ParallelAuthenticator); }; diff --git a/chrome/browser/chromeos/login/parallel_authenticator_unittest.cc b/chrome/browser/chromeos/login/parallel_authenticator_unittest.cc index 53ef3a3..adadf98 100644 --- a/chrome/browser/chromeos/login/parallel_authenticator_unittest.cc +++ b/chrome/browser/chromeos/login/parallel_authenticator_unittest.cc @@ -6,15 +6,12 @@ #include <string> -#include "base/bind.h" #include "base/file_path.h" #include "base/file_util.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop.h" -#include "base/path_service.h" #include "base/string_util.h" #include "base/stringprintf.h" -#include "base/test/thread_test_helper.h" #include "chrome/browser/chromeos/cros/cros_library.h" #include "chrome/browser/chromeos/cros/mock_cryptohome_library.h" #include "chrome/browser/chromeos/cros/mock_library_loader.h" @@ -25,7 +22,6 @@ #include "chrome/browser/chromeos/login/mock_user_manager.h" #include "chrome/browser/chromeos/login/test_attempt_state.h" #include "chrome/browser/chromeos/stub_cros_settings_provider.h" -#include "chrome/common/chrome_paths.h" #include "chrome/common/net/gaia/mock_url_fetcher_factory.h" #include "chrome/test/base/testing_profile.h" #include "chromeos/dbus/mock_cryptohome_client.h" @@ -39,11 +35,6 @@ #include "third_party/cros_system_api/dbus/service_constants.h" using content::BrowserThread; -using file_util::CloseFile; -using file_util::CreateAndOpenTemporaryFile; -using file_util::CreateAndOpenTemporaryFileInDir; -using file_util::Delete; -using file_util::WriteFile; using ::testing::AnyNumber; using ::testing::DoAll; using ::testing::Invoke; @@ -124,10 +115,10 @@ class ParallelAuthenticatorTest : public testing::Test { FilePath PopulateTempFile(const char* data, int data_len) { FilePath out; - FILE* tmp_file = CreateAndOpenTemporaryFile(&out); + FILE* tmp_file = file_util::CreateAndOpenTemporaryFile(&out); EXPECT_NE(tmp_file, static_cast<FILE*>(NULL)); - EXPECT_EQ(WriteFile(out, data, data_len), data_len); - EXPECT_TRUE(CloseFile(tmp_file)); + EXPECT_EQ(file_util::WriteFile(out, data, data_len), data_len); + EXPECT_TRUE(file_util::CloseFile(tmp_file)); return out; } |