Index: chrome/browser/profiles/profile_manager.cc |
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc |
index fc9d18615c80cd0e44204a97fd6d80a78d551e16..6c9d227e816fec3b031d8dc813f0e1bed2e48536 100644 |
--- a/chrome/browser/profiles/profile_manager.cc |
+++ b/chrome/browser/profiles/profile_manager.cc |
@@ -51,6 +51,7 @@ |
#if defined(OS_CHROMEOS) |
#include "chrome/browser/chromeos/cros/cros_library.h" |
#include "chrome/browser/chromeos/cros/cryptohome_library.h" |
+#include "chrome/browser/chromeos/login/user_manager.h" |
#endif |
using content::BrowserThread; |
@@ -183,6 +184,16 @@ Profile* ProfileManager::GetDefaultProfile() { |
} |
// static |
+Profile* ProfileManager::GetDefaultProfileOrOffTheRecord() { |
Nikita (slow)
2012/03/19 10:50:46
I see this method as a temporary measure as we cou
Jun Mukai
2012/03/19 11:00:59
Done.
|
+ Profile* profile = GetDefaultProfile(); |
+#if defined(OS_CHROMEOS) |
+ if (chromeos::UserManager::Get()->IsLoggedInAsGuest()) |
+ profile = profile->GetOffTheRecordProfile(); |
+#endif |
+ return profile; |
+} |
+ |
+// static |
Profile* ProfileManager::GetLastUsedProfile() { |
ProfileManager* profile_manager = g_browser_process->profile_manager(); |
return profile_manager->GetLastUsedProfile(profile_manager->user_data_dir_); |