summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/process_singleton_linux.cc2
-rw-r--r--chrome/test/unit/chrome_test_suite.h12
2 files changed, 2 insertions, 12 deletions
diff --git a/chrome/browser/process_singleton_linux.cc b/chrome/browser/process_singleton_linux.cc
index 57a6531..fcd64259 100644
--- a/chrome/browser/process_singleton_linux.cc
+++ b/chrome/browser/process_singleton_linux.cc
@@ -64,8 +64,6 @@ void ProcessSingleton::SetupSocket(int* sock, struct sockaddr_un* addr) {
LOG(FATAL) << "socket() failed: " << strerror(errno);
addr->sun_family = AF_UNIX;
- if (socket_path_.value().length() > sizeof(addr->sun_path) - 1)
- LOG(FATAL) << "Socket path too long: " << socket_path_.value();
base::strlcpy(addr->sun_path, socket_path_.value().c_str(),
sizeof(addr->sun_path));
}
diff --git a/chrome/test/unit/chrome_test_suite.h b/chrome/test/unit/chrome_test_suite.h
index beb81c4..ff187da 100644
--- a/chrome/test/unit/chrome_test_suite.h
+++ b/chrome/test/unit/chrome_test_suite.h
@@ -11,7 +11,7 @@
#include "app/resource_bundle.h"
#include "base/stats_table.h"
-#include "base/file_util.h"
+#include "base/file_path.h"
#if defined(OS_MACOSX)
#include "base/mac_util.h"
#endif
@@ -81,9 +81,8 @@ class ChromeTestSuite : public TestSuite {
CommandLine::ForCurrentProcess()->GetSwitchValue(
switches::kUserDataDir));
if (user_data_dir.empty() &&
- file_util::CreateNewTempDirectory("chrome_test_", &user_data_dir)) {
+ PathService::Get(base::DIR_EXE, &user_data_dir))
user_data_dir = user_data_dir.AppendASCII("test_user_data");
- }
if (!user_data_dir.empty())
PathService::Override(chrome::DIR_USER_DATA,
user_data_dir.ToWStringHack());
@@ -123,13 +122,6 @@ class ChromeTestSuite : public TestSuite {
StatsTable::set_current(NULL);
delete stats_table_;
- // Delete the test_user_data dir recursively
- FilePath user_data_dir;
- if (PathService::Get(chrome::DIR_USER_DATA, &user_data_dir) &&
- !user_data_dir.empty()) {
- file_util::Delete(user_data_dir, true);
- file_util::Delete(user_data_dir.DirName(), false);
- }
TestSuite::Shutdown();
}