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

Unified Diff: content/shell/shell_browser_context.cc

Issue 10545087: Use a fresh, temporary profile when running content_shell in DRT mode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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
« no previous file with comments | « content/shell/shell_browser_context.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/shell_browser_context.cc
diff --git a/content/shell/shell_browser_context.cc b/content/shell/shell_browser_context.cc
index 53134eea74dc4ec8360fa10c7fe8e109fa596dd4..3af52d4ab3c16455b4bc946ec073b768da04ae2d 100644
--- a/content/shell/shell_browser_context.cc
+++ b/content/shell/shell_browser_context.cc
@@ -5,6 +5,7 @@
#include "content/shell/shell_browser_context.h"
#include "base/bind.h"
+#include "base/command_line.h"
#include "base/environment.h"
#include "base/file_util.h"
#include "base/logging.h"
@@ -13,6 +14,7 @@
#include "content/public/browser/browser_thread.h"
#include "content/shell/shell_download_manager_delegate.h"
#include "content/shell/shell_resource_context.h"
+#include "content/shell/shell_switches.h"
#include "content/shell/shell_url_request_context_getter.h"
#if defined(OS_WIN)
@@ -48,6 +50,11 @@ ShellBrowserContext::~ShellBrowserContext() {
}
void ShellBrowserContext::InitWhileIOAllowed() {
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) {
+ CHECK(testing_path_.CreateUniqueTempDir());
+ path_ = testing_path_.path();
+ return;
+ }
#if defined(OS_WIN)
CHECK(PathService::Get(base::DIR_LOCAL_APP_DATA, &path_));
path_ = path_.Append(std::wstring(L"content_shell"));
« no previous file with comments | « content/shell/shell_browser_context.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698