Index: chrome/test/base/testing_profile_manager.cc |
diff --git a/chrome/test/base/testing_profile_manager.cc b/chrome/test/base/testing_profile_manager.cc |
index dd41700b322bfab9f6764f95d7ed21d1929294f5..0bbc4ee6c65fe56ac85b9d8c3b883880d1598a59 100644 |
--- a/chrome/test/base/testing_profile_manager.cc |
+++ b/chrome/test/base/testing_profile_manager.cc |
@@ -10,9 +10,14 @@ |
#include "chrome/browser/prefs/pref_service_syncable.h" |
#include "chrome/browser/profiles/profile_info_cache.h" |
#include "chrome/browser/profiles/profile_manager.h" |
+#include "chrome/common/chrome_constants.h" |
#include "chrome/test/base/testing_browser_process.h" |
#include "testing/gtest/include/gtest/gtest.h" |
+#if defined(OS_CHROMEOS) |
+#include "chrome/browser/chromeos/profiles/profile_helper.h" |
+#endif |
+ |
const std::string kGuestProfileName = "Guest"; |
namespace testing { |
@@ -60,7 +65,18 @@ TestingProfile* TestingProfileManager::CreateTestingProfile( |
// Create a path for the profile based on the name. |
base::FilePath profile_path(profiles_dir_.path()); |
+#if defined(OS_CHROMEOS) |
+ if (profile_name != chrome::kInitialProfile) { |
+ profile_path = |
+ profile_path.Append(chromeos::ProfileHelper::Get()->GetUserProfileDir( |
+ chromeos::ProfileHelper::GetUserIdHashByUserIdForTesting( |
+ profile_name))); |
+ } else { |
+ profile_path = profile_path.AppendASCII(profile_name); |
+ } |
+#else |
profile_path = profile_path.AppendASCII(profile_name); |
+#endif |
// Create the profile and register it. |
TestingProfile::Builder builder; |