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

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

Issue 10386134: Record API fix adding FirstRun, and allowing repeat-count in capture (plus some browsertests along … (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Refined version with overlooked browsertest also fixed. 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 0f4c4731935be743d702a0d0cf3a07be8b155197..9a3a49a4733401e39161bcd6c69939d01315eedb 100644
--- a/chrome/browser/profiles/profile_impl_io_data.cc
+++ b/chrome/browser/profiles/profile_impl_io_data.cc
@@ -268,8 +268,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.
@@ -465,8 +468,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.

Powered by Google App Engine
This is Rietveld 408576698