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

Unified Diff: chrome/browser/profiles/profile_manager.cc

Issue 9691032: Use OffTheRecord profile in case of GuestLogin for AppList. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add ProfileManager's method Created 8 years, 9 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
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_);
« no previous file with comments | « chrome/browser/profiles/profile_manager.h ('k') | chrome/browser/ui/views/ash/app_list/app_list_view_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698