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

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

Issue 101413011: Prevent creating background pages for non-incognito profile in Guest mode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years 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 d89b3a445c8097253b5b7e9d55b20b808d37d88e..cacef1b082f43530bccb59636861f9324c9cb036 100644
--- a/chrome/browser/profiles/profile_manager.cc
+++ b/chrome/browser/profiles/profile_manager.cc
@@ -1100,9 +1100,10 @@ bool ProfileManager::ShouldGoOffTheRecord(Profile* profile) {
bool go_off_the_record = false;
#if defined(OS_CHROMEOS)
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
- if (profile->GetPath().BaseName().value() == chrome::kInitialProfile &&
- (!command_line.HasSwitch(switches::kTestType) ||
- command_line.HasSwitch(chromeos::switches::kLoginProfile))) {
+ if (command_line.HasSwitch(chromeos::switches::kGuestSession) ||
+ (profile->GetPath().BaseName().value() == chrome::kInitialProfile &&
+ (!command_line.HasSwitch(switches::kTestType) ||
+ command_line.HasSwitch(chromeos::switches::kLoginProfile)))) {
miket_OOO 2013/12/20 18:59:02 This code is getting pretty tricky. What do you th
Dmitry Polukhin 2013/12/20 21:55:54 It looks like creating test is not easy task becau
go_off_the_record = true;
}
#endif
« no previous file with comments | « chrome/browser/extensions/chrome_extensions_browser_client.cc ('k') | extensions/browser/extensions_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698