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

Unified Diff: content/shell/browser/shell_browser_context.cc

Issue 641343002: Content Shell: Introduce LayoutTestBrowserContext. (Reland) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed. Created 6 years, 2 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/browser/shell_browser_context.h ('k') | content/shell/browser/shell_browser_main_parts.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/browser/shell_browser_context.cc
diff --git a/content/shell/browser/shell_browser_context.cc b/content/shell/browser/shell_browser_context.cc
index 308ed388359e2697edf9b03e72eae275134da926..b6a2ab5335b0c3cc6cf6834037b3428f3076113e 100644
--- a/content/shell/browser/shell_browser_context.cc
+++ b/content/shell/browser/shell_browser_context.cc
@@ -49,9 +49,9 @@ ShellBrowserContext::ShellResourceContext::GetRequestContext() {
ShellBrowserContext::ShellBrowserContext(bool off_the_record,
net::NetLog* net_log)
: resource_context_(new ShellResourceContext),
+ ignore_certificate_errors_(false),
off_the_record_(off_the_record),
net_log_(net_log),
- ignore_certificate_errors_(false),
guest_manager_(NULL) {
InitWhileIOAllowed();
}
@@ -65,10 +65,8 @@ ShellBrowserContext::~ShellBrowserContext() {
void ShellBrowserContext::InitWhileIOAllowed() {
CommandLine* cmd_line = CommandLine::ForCurrentProcess();
- if (cmd_line->HasSwitch(switches::kIgnoreCertificateErrors) ||
- cmd_line->HasSwitch(switches::kDumpRenderTree)) {
+ if (cmd_line->HasSwitch(switches::kIgnoreCertificateErrors))
ignore_certificate_errors_ = true;
- }
if (cmd_line->HasSwitch(switches::kContentShellDataPath)) {
path_ = cmd_line->GetSwitchValuePath(switches::kContentShellDataPath);
return;
@@ -106,16 +104,10 @@ bool ShellBrowserContext::IsOffTheRecord() const {
}
DownloadManagerDelegate* ShellBrowserContext::GetDownloadManagerDelegate() {
- DownloadManager* manager = BrowserContext::GetDownloadManager(this);
-
if (!download_manager_delegate_.get()) {
download_manager_delegate_.reset(new ShellDownloadManagerDelegate());
- download_manager_delegate_->SetDownloadManager(manager);
- CommandLine* cmd_line = CommandLine::ForCurrentProcess();
- if (cmd_line->HasSwitch(switches::kDumpRenderTree)) {
- download_manager_delegate_->SetDownloadBehaviorForTesting(
- path_.Append(FILE_PATH_LITERAL("downloads")));
- }
+ download_manager_delegate_->SetDownloadManager(
+ BrowserContext::GetDownloadManager(this));
}
return download_manager_delegate_.get();
« no previous file with comments | « content/shell/browser/shell_browser_context.h ('k') | content/shell/browser/shell_browser_main_parts.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698