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

Unified Diff: chrome/test/base/testing_profile_manager.cc

Issue 442043002: ProfileManager doesn't depend on "--login-profile" switch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698