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 66c54a9570aa437b991c62df97701a55db131fc8..9aeea3c09543265d5e89911b6c961a701804552f 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 { |
@@ -59,7 +64,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::Get()->GetUserIdHashByUserIdForTests( |
+ 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; |