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

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

Issue 10491010: Reland r140188: CommandLine Page Cycler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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_impl_io_data.cc
diff --git a/chrome/browser/profiles/profile_impl_io_data.cc b/chrome/browser/profiles/profile_impl_io_data.cc
index 454f0b04212b1373120191fc5af6cdc2fbb4abf4..a3af32e0dba30ba49ad448d23cc0d6b3ec2143af 100644
--- a/chrome/browser/profiles/profile_impl_io_data.cc
+++ b/chrome/browser/profiles/profile_impl_io_data.cc
@@ -272,8 +272,11 @@ void ProfileImplIOData::LazyInitializeInternal(
IOThread* const io_thread = profile_params->io_thread;
IOThread::Globals* const io_thread_globals = io_thread->globals();
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
- bool record_mode = chrome::kRecordModeEnabled &&
- command_line.HasSwitch(switches::kRecordMode);
+ // Only allow Record Mode if we are in a Debug build or where we are running
+ // a cycle, and the user has limited control.
+ bool record_mode = command_line.HasSwitch(switches::kRecordMode) &&
+ (chrome::kRecordModeEnabled ||
+ command_line.HasSwitch(switches::kVisitURLs));
bool playback_mode = command_line.HasSwitch(switches::kPlaybackMode);
// Initialize context members.
@@ -472,8 +475,11 @@ ProfileImplIOData::InitializeAppRequestContext(
int cache_max_size = 0;
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
- bool record_mode = chrome::kRecordModeEnabled &&
- command_line.HasSwitch(switches::kRecordMode);
+ // Only allow Record Mode if we are in a Debug build or where we are running
+ // a cycle, and the user has limited control.
+ bool record_mode = command_line.HasSwitch(switches::kRecordMode) &&
+ (chrome::kRecordModeEnabled ||
+ command_line.HasSwitch(switches::kVisitURLs));
bool playback_mode = command_line.HasSwitch(switches::kPlaybackMode);
// Use a separate HTTP disk cache for isolated apps.
« no previous file with comments | « chrome/browser/page_cycler/page_cycler_unittest.cc ('k') | chrome/browser/ui/startup/startup_browser_creator_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698